cc-2055: switch to init.d
-remove update-rc.d on uninstall -remove unecessary imports in install/uninstall scripts -all daemons now wait until apache2 is available before starting (LSB Init Script)
This commit is contained in:
parent
6ab5ac4582
commit
4c9c86bf4f
12 changed files with 42 additions and 20 deletions
|
@ -1,5 +1,14 @@
|
|||
#!/bin/bash
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: airtime-show-recorder
|
||||
# Required-Start: $local_fs $remote_fs $network $syslog apache2
|
||||
# Required-Stop: $local_fs $remote_fs $network $syslog
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: Manage airtime-show-recorder daemon
|
||||
### END INIT INFO
|
||||
|
||||
USERID=pypo
|
||||
GROUPID=pypo
|
||||
NAME=Airtime
|
||||
|
|
|
@ -3,16 +3,9 @@
|
|||
|
||||
import time
|
||||
import os
|
||||
import traceback
|
||||
from optparse import *
|
||||
import sys
|
||||
import time
|
||||
import datetime
|
||||
import logging
|
||||
import logging.config
|
||||
import shutil
|
||||
import string
|
||||
import platform
|
||||
from configobj import ConfigObj
|
||||
from subprocess import Popen
|
||||
|
||||
|
|
|
@ -3,7 +3,6 @@
|
|||
|
||||
import os
|
||||
import sys
|
||||
import time
|
||||
from configobj import ConfigObj
|
||||
|
||||
if os.geteuid() != 0:
|
||||
|
@ -30,6 +29,7 @@ try:
|
|||
|
||||
os.system("/etc/init.d/airtime-show-recorder stop")
|
||||
os.system("rm -f /etc/init.d/airtime-show-recorder")
|
||||
os.system("update-rc.d -f airtime-show-recorder remove")
|
||||
|
||||
print "Removing log directories"
|
||||
remove_path(config["log_dir"])
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue