remove symlink, not actual binary

This commit is contained in:
Martin Konecny 2012-08-21 12:06:07 -04:00
parent 831a1b1923
commit 2a497bf941
1 changed files with 3 additions and 3 deletions

View File

@ -85,16 +85,16 @@ try:
p = Popen("which liquidsoap", shell=True, stdout=PIPE) p = Popen("which liquidsoap", shell=True, stdout=PIPE)
liq_path = p.communicate()[0].strip() liq_path = p.communicate()[0].strip()
symlink_path = "/usr/bin/airtime-liquidsoap"
if p.returncode == 0: if p.returncode == 0:
try: try:
os.unlink(liq_path) os.remove(symlink_path)
except Exception: except Exception:
#liq_path DNE, which is OK. #liq_path DNE, which is OK.
pass pass
os.symlink(liq_path, symlink_path)
os.symlink(liq_path, "/usr/bin/airtime-liquidsoap")
else: else:
print " * Liquidsoap binary not found!" print " * Liquidsoap binary not found!"
sys.exit(1) sys.exit(1)