parent
c3085c8edf
commit
a2a8a8eae3
|
@ -225,6 +225,9 @@ install_setDirPermissions($CC_CONFIG["storageDir"]);
|
||||||
echo " * Importing sample audio clips \n";
|
echo " * Importing sample audio clips \n";
|
||||||
$command = __DIR__."/../utils/airtime-import --copy ../audio_samples/ > /dev/null";
|
$command = __DIR__."/../utils/airtime-import --copy ../audio_samples/ > /dev/null";
|
||||||
@exec($command, $output, $results);
|
@exec($command, $output, $results);
|
||||||
echo "****************************** Install Complete ******************************\n";
|
echo "****************************** Database Install Complete ******************************\n";
|
||||||
|
|
||||||
|
$command = "python ".__DIR__."/../pypo/install/pypo-install.py";
|
||||||
|
@exec($command, $output, $results);
|
||||||
|
//print_r($output);
|
||||||
?>
|
?>
|
|
@ -230,4 +230,7 @@ echo "************************************\n";
|
||||||
echo "* StorageServer Uninstall Complete *\n";
|
echo "* StorageServer Uninstall Complete *\n";
|
||||||
echo "************************************\n";
|
echo "************************************\n";
|
||||||
|
|
||||||
|
$command = "python ".__DIR__."/../pypo/install/pypo-uninstall.py";
|
||||||
|
@exec($command, $output, $results);
|
||||||
|
//print_r($output);
|
||||||
?>
|
?>
|
|
@ -0,0 +1,6 @@
|
||||||
|
This tool was born out of a collaboration between Open Broadcast
|
||||||
|
and Sourcefabric. The authors of the code are:
|
||||||
|
|
||||||
|
Jonas Ohrstrom <jonas@digris.ch>
|
||||||
|
Paul Baranowski <paul.baranowski@sourcefabric.org>
|
||||||
|
Martin Konecny <martin.konecny@sourcefabric.org>
|
|
@ -54,10 +54,17 @@ def copy_dir(src_dir, dest_dir):
|
||||||
print "Copying directory "+src_dir+" to "+dest_dir
|
print "Copying directory "+src_dir+" to "+dest_dir
|
||||||
shutil.copytree(src_dir, dest_dir)
|
shutil.copytree(src_dir, dest_dir)
|
||||||
|
|
||||||
try:
|
def get_current_script_dir():
|
||||||
|
current_script_dir = os.path.realpath(__file__)
|
||||||
|
index = current_script_dir.rindex('/')
|
||||||
|
print current_script_dir[0:index]
|
||||||
|
return current_script_dir[0:index]
|
||||||
|
|
||||||
|
|
||||||
|
try:
|
||||||
|
current_script_dir = get_current_script_dir()
|
||||||
print "Terminating any existing pypo processes"
|
print "Terminating any existing pypo processes"
|
||||||
os.system("python ./pypo-stop.py")
|
os.system("python %s/pypo-stop.py"% current_script_dir)
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
|
|
||||||
# Create users
|
# Create users
|
||||||
|
@ -79,19 +86,19 @@ try:
|
||||||
create_path(BASE_PATH+"archive")
|
create_path(BASE_PATH+"archive")
|
||||||
|
|
||||||
print "Copying pypo files"
|
print "Copying pypo files"
|
||||||
shutil.copy("../scripts/silence.mp3", BASE_PATH+"files/basic")
|
shutil.copy("%s/../scripts/silence.mp3"%current_script_dir, BASE_PATH+"files/basic")
|
||||||
|
|
||||||
if platform.architecture()[0] == '64bit':
|
if platform.architecture()[0] == '64bit':
|
||||||
print "Installing 64-bit liquidsoap binary"
|
print "Installing 64-bit liquidsoap binary"
|
||||||
shutil.copy("../liquidsoap/liquidsoap64", "../liquidsoap/liquidsoap")
|
shutil.copy("%s/../liquidsoap/liquidsoap64"%current_script_dir, "%s/../liquidsoap/liquidsoap"%current_script_dir)
|
||||||
elif platform.architecture()[0] == '32bit':
|
elif platform.architecture()[0] == '32bit':
|
||||||
print "Installing 32-bit liquidsoap binary"
|
print "Installing 32-bit liquidsoap binary"
|
||||||
shutil.copy("../liquidsoap/liquidsoap32", "../liquidsoap/liquidsoap")
|
shutil.copy("%s/../liquidsoap/liquidsoap32"%current_script_dir, "%s/../liquidsoap/liquidsoap"%current_script_dir)
|
||||||
else:
|
else:
|
||||||
print "Unknown system architecture."
|
print "Unknown system architecture."
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
copy_dir("..", BASE_PATH+"bin/")
|
copy_dir("%s/.."%current_script_dir, BASE_PATH+"bin/")
|
||||||
|
|
||||||
print "Setting permissions"
|
print "Setting permissions"
|
||||||
os.system("chmod -R 755 "+BASE_PATH)
|
os.system("chmod -R 755 "+BASE_PATH)
|
||||||
|
@ -100,30 +107,30 @@ try:
|
||||||
print "Installing daemontool script pypo-fetch"
|
print "Installing daemontool script pypo-fetch"
|
||||||
create_path("/etc/service/pypo-fetch")
|
create_path("/etc/service/pypo-fetch")
|
||||||
create_path("/etc/service/pypo-fetch/log")
|
create_path("/etc/service/pypo-fetch/log")
|
||||||
shutil.copy("pypo-daemontools-fetch.sh", "/etc/service/pypo-fetch/run")
|
shutil.copy("%s/pypo-daemontools-fetch.sh"%current_script_dir, "/etc/service/pypo-fetch/run")
|
||||||
shutil.copy("pypo-daemontools-logger.sh", "/etc/service/pypo-fetch/log/run")
|
shutil.copy("%s/pypo-daemontools-logger.sh"%current_script_dir, "/etc/service/pypo-fetch/log/run")
|
||||||
os.system("chmod -R 755 /etc/service/pypo-fetch")
|
os.system("chmod -R 755 /etc/service/pypo-fetch")
|
||||||
os.system("chown -R pypo:pypo /etc/service/pypo-fetch")
|
os.system("chown -R pypo:pypo /etc/service/pypo-fetch")
|
||||||
|
|
||||||
print "Installing daemontool script pypo-push"
|
print "Installing daemontool script pypo-push"
|
||||||
create_path("/etc/service/pypo-push")
|
create_path("/etc/service/pypo-push")
|
||||||
create_path("/etc/service/pypo-push/log")
|
create_path("/etc/service/pypo-push/log")
|
||||||
shutil.copy("pypo-daemontools-push.sh", "/etc/service/pypo-push/run")
|
shutil.copy("%s/pypo-daemontools-push.sh"%current_script_dir, "/etc/service/pypo-push/run")
|
||||||
shutil.copy("pypo-daemontools-logger.sh", "/etc/service/pypo-push/log/run")
|
shutil.copy("%s/pypo-daemontools-logger.sh"%current_script_dir, "/etc/service/pypo-push/log/run")
|
||||||
os.system("chmod -R 755 /etc/service/pypo-push")
|
os.system("chmod -R 755 /etc/service/pypo-push")
|
||||||
os.system("chown -R pypo:pypo /etc/service/pypo-push")
|
os.system("chown -R pypo:pypo /etc/service/pypo-push")
|
||||||
|
|
||||||
print "Installing daemontool script pypo-liquidsoap"
|
print "Installing daemontool script pypo-liquidsoap"
|
||||||
create_path("/etc/service/pypo-liquidsoap")
|
create_path("/etc/service/pypo-liquidsoap")
|
||||||
create_path("/etc/service/pypo-liquidsoap/log")
|
create_path("/etc/service/pypo-liquidsoap/log")
|
||||||
shutil.copy("pypo-daemontools-liquidsoap.sh", "/etc/service/pypo-liquidsoap/run")
|
shutil.copy("%s/pypo-daemontools-liquidsoap.sh"%current_script_dir, "/etc/service/pypo-liquidsoap/run")
|
||||||
shutil.copy("pypo-daemontools-logger.sh", "/etc/service/pypo-liquidsoap/log/run")
|
shutil.copy("%s/pypo-daemontools-logger.sh"%current_script_dir, "/etc/service/pypo-liquidsoap/log/run")
|
||||||
os.system("chmod -R 755 /etc/service/pypo-liquidsoap")
|
os.system("chmod -R 755 /etc/service/pypo-liquidsoap")
|
||||||
os.system("chown -R pypo:pypo /etc/service/pypo-liquidsoap")
|
os.system("chown -R pypo:pypo /etc/service/pypo-liquidsoap")
|
||||||
|
|
||||||
print "Waiting for processes to start..."
|
print "Waiting for processes to start..."
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
os.system("python ./pypo-start.py")
|
os.system("python %s/pypo-start.py" % (get_current_script_dir()))
|
||||||
time.sleep(2)
|
time.sleep(2)
|
||||||
|
|
||||||
found = True
|
found = True
|
||||||
|
|
|
@ -22,9 +22,14 @@ def remove_user(username):
|
||||||
time.sleep(5)
|
time.sleep(5)
|
||||||
|
|
||||||
os.system("deluser --remove-home " + username + " 1>/dev/null")
|
os.system("deluser --remove-home " + username + " 1>/dev/null")
|
||||||
|
|
||||||
|
def get_current_script_dir():
|
||||||
|
current_script_dir = os.path.realpath(__file__)
|
||||||
|
index = current_script_dir.rindex('/')
|
||||||
|
return current_script_dir[0:index]
|
||||||
|
|
||||||
try:
|
try:
|
||||||
os.system("python ./pypo-stop.py")
|
os.system("python %s/pypo-stop.py" % get_current_script_dir())
|
||||||
|
|
||||||
print "Removing log directories"
|
print "Removing log directories"
|
||||||
remove_path("/var/log/pypo")
|
remove_path("/var/log/pypo")
|
||||||
|
|
Loading…
Reference in New Issue