CC-2166 Packaging improvements

Added command line options to the install process to overwrite or
preserve the existing config files.

Added the pypo-start/stop and recorder-start/stop symlinks to /usr/bin.

Renamed pypo-start.py to airtime-pypo-start.
Renamed pypo-stop.py to airtime-pypo-stop.
Renamed recorder-start.py to airtime-show-recorder-start.
Renamed recorder-stop.py to airtime-show-recorder-stop.

Renamed testrecordscript.py to recorder.py
This commit is contained in:
Paul Baranowski 2011-04-15 18:23:51 -04:00
parent 2b90008ef2
commit 173d82007f
14 changed files with 75 additions and 21 deletions

View file

@ -1,2 +1,2 @@
#!/bin/sh
exec setuidgid pypo multilog t /var/log/airtime/recorder/main
exec setuidgid pypo multilog t /var/log/airtime/show-recorder/main

View file

@ -4,8 +4,8 @@ export HOME="/var/tmp/airtime/show-recorder/"
export TERM=xterm
# Location of pypo_cli.py Python script
recorder_path="/usr/lib/airtime/show-recorder/bin/"
recorder_script="testrecordscript.py"
recorder_path="/usr/lib/airtime/show-recorder/"
recorder_script="recorder.py"
api_client_path="/usr/lib/airtime/pypo/"
cd ${recorder_path}

8
python_apps/show-recorder/install/recorder-install.py Normal file → Executable file
View file

@ -92,6 +92,12 @@ try:
print "Setting permissions"
os.system("chmod -R 755 "+config["bin_dir"])
os.system("chown -R pypo:pypo "+config["bin_dir"])
print "Creating symbolic links"
os.system("rm -f /usr/bin/airtime-show-recorder-start")
os.system("ln -s "+config["bin_dir"]+"/airtime-show-recorder-start /usr/bin/")
os.system("rm -f /usr/bin/airtime-show-recorder-stop")
os.system("ln -s "+config["bin_dir"]+"/airtime-show-recorder-stop /usr/bin/")
print "Installing recorder daemon"
create_path("/etc/service/recorder")
@ -103,7 +109,7 @@ try:
print "Waiting for processes to start..."
time.sleep(5)
os.system("python %s/recorder-start.py" % (get_current_script_dir()))
os.system("python /usr/bin/airtime-show-recorder-start")
time.sleep(2)
found = True

View file

@ -37,11 +37,15 @@ try:
print 'Error loading config file: ', e
sys.exit()
os.system("python %s/recorder-stop.py" % get_current_script_dir())
os.system("python /usr/bin/airtime-show-recorder-stop")
print "Removing log directories"
remove_path(config["log_dir"])
print "Removing symlinks"
os.system("rm -f /usr/bin/airtime-show-recorder-start")
os.system("rm -f /usr/bin/airtime-show-recorder-stop")
print "Removing application files"
remove_path(config["bin_dir"])