CC-2410: Clean up install process
-hiding a few more warnings.
This commit is contained in:
parent
de436486fb
commit
aa56344a29
|
@ -26,6 +26,7 @@ echo -e "\n*** Media Monitor Installation ***"
|
||||||
python ${SCRIPTPATH}/../python_apps/media-monitor/install/media-monitor-install.py
|
python ${SCRIPTPATH}/../python_apps/media-monitor/install/media-monitor-install.py
|
||||||
|
|
||||||
sleep 4
|
sleep 4
|
||||||
|
echo -e "\n*** Verifying your system environment ***"
|
||||||
airtime-check-system
|
airtime-check-system
|
||||||
|
|
||||||
echo -e "\n******************************* Install Complete *******************************"
|
echo -e "\n******************************* Install Complete *******************************"
|
||||||
|
|
|
@ -89,7 +89,7 @@ class AirtimeIni
|
||||||
}
|
}
|
||||||
|
|
||||||
public static function RemoveMonitFile(){
|
public static function RemoveMonitFile(){
|
||||||
unlink("/etc/monit/conf.d/airtime-monit.cfg");
|
@unlink("/etc/monit/conf.d/airtime-monit.cfg");
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -69,7 +69,7 @@ if ($dbDeleteFailed) {
|
||||||
// Delete the user
|
// Delete the user
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
echo " * Deleting database user '{$CC_CONFIG['dsn']['username']}'...".PHP_EOL;
|
echo " * Deleting database user '{$CC_CONFIG['dsn']['username']}'...".PHP_EOL;
|
||||||
$command = "echo \"DROP USER IF EXISTS {$CC_CONFIG['dsn']['username']}\" | su postgres -c psql";
|
$command = "echo \"DROP USER IF EXISTS {$CC_CONFIG['dsn']['username']}\" | su postgres -c psql >/dev/null 2>&1";
|
||||||
@exec($command, $output, $results);
|
@exec($command, $output, $results);
|
||||||
if ($results == 0) {
|
if ($results == 0) {
|
||||||
echo " * User '{$CC_CONFIG['dsn']['username']}' deleted.".PHP_EOL;
|
echo " * User '{$CC_CONFIG['dsn']['username']}' deleted.".PHP_EOL;
|
||||||
|
|
|
@ -17,13 +17,13 @@ DAEMON=/usr/lib/airtime/media-monitor/airtime-media-monitor
|
||||||
PIDFILE=/var/run/airtime-media-monitor.pid
|
PIDFILE=/var/run/airtime-media-monitor.pid
|
||||||
|
|
||||||
start () {
|
start () {
|
||||||
monit monitor airtime-media-monitor
|
monit monitor airtime-media-monitor >/dev/null 2>&1
|
||||||
start-stop-daemon --start --background --quiet --chuid $USERID:$GROUPID --make-pidfile --pidfile $PIDFILE --startas $DAEMON
|
start-stop-daemon --start --background --quiet --chuid $USERID:$GROUPID --make-pidfile --pidfile $PIDFILE --startas $DAEMON
|
||||||
}
|
}
|
||||||
|
|
||||||
stop () {
|
stop () {
|
||||||
# Send TERM after 5 seconds, wait at most 30 seconds.
|
# Send TERM after 5 seconds, wait at most 30 seconds.
|
||||||
monit unmonitor airtime-media-monitor
|
monit unmonitor airtime-media-monitor >/dev/null 2>&1
|
||||||
start-stop-daemon --stop --oknodo --retry TERM/5/0/30 --quiet --pidfile $PIDFILE
|
start-stop-daemon --stop --oknodo --retry TERM/5/0/30 --quiet --pidfile $PIDFILE
|
||||||
rm -f $PIDFILE
|
rm -f $PIDFILE
|
||||||
}
|
}
|
||||||
|
|
|
@ -20,21 +20,21 @@ DAEMON1=/usr/lib/airtime/pypo/bin/airtime-liquidsoap
|
||||||
PIDFILE1=/var/run/airtime-liquidsoap.pid
|
PIDFILE1=/var/run/airtime-liquidsoap.pid
|
||||||
|
|
||||||
start () {
|
start () {
|
||||||
monit monitor airtime-playout
|
monit monitor airtime-playout >/dev/null 2>&1
|
||||||
start-stop-daemon --start --background --quiet --chuid $USERID:$GROUPID --make-pidfile --pidfile $PIDFILE0 --startas $DAEMON0
|
start-stop-daemon --start --background --quiet --chuid $USERID:$GROUPID --make-pidfile --pidfile $PIDFILE0 --startas $DAEMON0
|
||||||
|
|
||||||
monit monitor airtime-liquidsoap
|
monit monitor airtime-liquidsoap >/dev/null 2>&1
|
||||||
start-stop-daemon --start --background --quiet --chuid $USERID:$GROUPID --make-pidfile --pidfile $PIDFILE1 --startas $DAEMON1
|
start-stop-daemon --start --background --quiet --chuid $USERID:$GROUPID --make-pidfile --pidfile $PIDFILE1 --startas $DAEMON1
|
||||||
}
|
}
|
||||||
|
|
||||||
stop () {
|
stop () {
|
||||||
# Send TERM after 5 seconds, wait at most 30 seconds.
|
# Send TERM after 5 seconds, wait at most 30 seconds.
|
||||||
|
|
||||||
monit unmonitor airtime-playout
|
monit unmonitor airtime-playout >/dev/null 2>&1
|
||||||
start-stop-daemon --stop --oknodo --retry TERM/5/0/30 --quiet --pidfile $PIDFILE0
|
start-stop-daemon --stop --oknodo --retry TERM/5/0/30 --quiet --pidfile $PIDFILE0
|
||||||
rm -f $PIDFILE0
|
rm -f $PIDFILE0
|
||||||
|
|
||||||
monit unmonitor airtime-liquidsoap
|
monit unmonitor airtime-liquidsoap >/dev/null 2>&1
|
||||||
start-stop-daemon --stop --oknodo --retry TERM/5/0/30 --quiet --pidfile $PIDFILE1
|
start-stop-daemon --stop --oknodo --retry TERM/5/0/30 --quiet --pidfile $PIDFILE1
|
||||||
rm -f $PIDFILE1
|
rm -f $PIDFILE1
|
||||||
}
|
}
|
||||||
|
|
|
@ -17,14 +17,14 @@ DAEMON=/usr/lib/airtime/show-recorder/airtime-show-recorder
|
||||||
PIDFILE=/var/run/airtime-show-recorder.pid
|
PIDFILE=/var/run/airtime-show-recorder.pid
|
||||||
|
|
||||||
start () {
|
start () {
|
||||||
monit monitor airtime-show-recorder
|
monit monitor airtime-show-recorder >/dev/null 2>&1
|
||||||
start-stop-daemon --start --background --quiet --chuid $USERID:$GROUPID --make-pidfile --pidfile $PIDFILE --startas $DAEMON
|
start-stop-daemon --start --background --quiet --chuid $USERID:$GROUPID --make-pidfile --pidfile $PIDFILE --startas $DAEMON
|
||||||
}
|
}
|
||||||
|
|
||||||
stop () {
|
stop () {
|
||||||
# Send TERM after 5 seconds, wait at most 30 seconds.
|
# Send TERM after 5 seconds, wait at most 30 seconds.
|
||||||
|
|
||||||
monit unmonitor airtime-show-recorder
|
monit unmonitor airtime-show-recorder >/dev/null 2>&1
|
||||||
start-stop-daemon --stop --oknodo --retry TERM/5/0/30 --quiet --pidfile $PIDFILE
|
start-stop-daemon --stop --oknodo --retry TERM/5/0/30 --quiet --pidfile $PIDFILE
|
||||||
rm -f $PIDFILE
|
rm -f $PIDFILE
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue