CC-2016: Rearrange python scripts for reusability
-fixed path issue that was happening on some systems
This commit is contained in:
parent
c254422f72
commit
17181674b7
5 changed files with 14 additions and 7 deletions
|
@ -82,7 +82,7 @@ if ($results == 0) {
|
||||||
AirtimeInstall::DeleteFilesRecursive($CC_CONFIG['storageDir']);
|
AirtimeInstall::DeleteFilesRecursive($CC_CONFIG['storageDir']);
|
||||||
|
|
||||||
|
|
||||||
$command = "python ".__DIR__."/../pypo/install/pypo-uninstall.py";
|
$command = "python ".__DIR__."/../python_apps/pypo/install/pypo-uninstall.py";
|
||||||
system($command);
|
system($command);
|
||||||
|
|
||||||
$command = "python ".__DIR__."/../python_apps/show-recorder/install/recorder-uninstall.py";
|
$command = "python ".__DIR__."/../python_apps/show-recorder/install/recorder-uninstall.py";
|
||||||
|
|
|
@ -214,8 +214,8 @@ class AirtimeInstall {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function RemoveSymlinks(){
|
public static function RemoveSymlinks(){
|
||||||
exec("rm /usr/bin/airtime-import");
|
exec("rm /usr/bin/airtime-import >/dev/null 2>&1");
|
||||||
exec("rm /usr/bin/airtime-clean-storage");
|
exec("rm /usr/bin/airtime-clean-storage >/dev/null 2>&1");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -50,6 +50,6 @@ try:
|
||||||
remove_path("/etc/service/pypo-liquidsoap")
|
remove_path("/etc/service/pypo-liquidsoap")
|
||||||
|
|
||||||
remove_user("pypo")
|
remove_user("pypo")
|
||||||
print "Uninstall complete."
|
print "Pypo uninstall complete."
|
||||||
except Exception, e:
|
except Exception, e:
|
||||||
print "exception:" + str(e)
|
print "exception:" + str(e)
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
def notify(m)
|
def notify(m)
|
||||||
system("./notify.sh --data='#{!pypo_data}' --media-id=#{m['schedule_table_id']}")
|
system("/opt/pypo/bin/scripts/notify.sh --data='#{!pypo_data}' --media-id=#{m['schedule_table_id']}")
|
||||||
print("./notify.sh --data='#{!pypo_data}' --media-id=#{m['schedule_table_id']}")
|
print("/opt/pypo/bin/scripts/notify.sh --data='#{!pypo_data}' --media-id=#{m['schedule_table_id']}")
|
||||||
end
|
end
|
||||||
|
|
||||||
# A function applied to each metadata chunk
|
# A function applied to each metadata chunk
|
||||||
|
|
|
@ -4,4 +4,11 @@
|
||||||
# needed here to keep dirs/configs clean #
|
# needed here to keep dirs/configs clean #
|
||||||
# and maybe to set user-rights #
|
# and maybe to set user-rights #
|
||||||
############################################
|
############################################
|
||||||
cd ../ && ./pypo-notify.py $1 $2 $3 $4 $5 $6 $7 $8 &
|
pwd
|
||||||
|
|
||||||
|
# Absolute path to this script
|
||||||
|
SCRIPT=`readlink -f $0`
|
||||||
|
# Absolute path this script is in
|
||||||
|
SCRIPTPATH=`dirname $SCRIPT`
|
||||||
|
|
||||||
|
cd ${SCRIPTPATH}/../ && ./pypo-notify.py $1 $2 $3 $4 $5 $6 $7 $8 &
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue