CC-3222: Add option to disable auto starting Airtime services (after install and after system restart)

-Done
This commit is contained in:
Martin Konecny 2011-12-23 15:32:48 -05:00
parent f4449865cc
commit 00a05e146b
10 changed files with 74 additions and 69 deletions

View file

@ -17,16 +17,17 @@ fi
showhelp () {
echo "Usage: airtime-install [options]
--help|-h Displays usage information.
--overwrite|-o Overwrite any existing config files.
--preserve|-p Keep any existing config files.
--no-db|-n Turn off database install.
--reinstall|-r Force a fresh install of this Airtime Version
--media-monitor|-m Install only media-monitor
--pypo|-p Install only pypo and liquidsoap
--show-recorder|-s Install only show-recorder
--web|-w Install only files for web-server
--liquidsoap-keep-alive|-l Keep Liquidsoap alive when upgrading"
--help|-h Displays usage information.
--overwrite|-o Overwrite any existing config files.
--preserve|-p Keep any existing config files.
--no-db|-n Turn off database install.
--reinstall|-r Force a fresh install of this Airtime Version
--media-monitor|-m Install only media-monitor
--pypo|-p Install only pypo and liquidsoap
--show-recorder|-s Install only show-recorder
--web|-w Install only files for web-server
--liquidsoap-keep-alive|-l Keep Liquidsoap alive when upgrading
--disable-auto-start-services|-d Disable auto-starting Airtime services"
}
overwrite="f"
@ -38,8 +39,9 @@ pypo="f"
showrecorder="f"
web="f"
liquidsoap_keep_alive="f"
disable_auto_start_services="f"
set -- $(getopt -l help,overwrite,preserve,no-db,reinstall,media-monitor,pypo,show-recorder,web,liquidsoap-keep-alive "hopnrmyswl" "$@")
set -- $(getopt -l help,overwrite,preserve,no-db,reinstall,media-monitor,pypo,show-recorder,web,liquidsoap-keep-alive,disable-auto-start-services "hopnrmyswld" "$@")
while [ $# -gt 0 ]
do
case "$1" in
@ -53,6 +55,7 @@ do
(-s|--show-recorder) showrecorder="t";;
(-w|--web) web="t";;
(-l|--liquidsoap-keep-alive) liquidsoap_keep_alive="t";;
(-d|--disable-auto-start-services) disable_auto_start_services="t";;
(--) shift; break;;
(-*) echo "$0: error - unrecognized option $1" 1>&2; exit 1;;
@ -107,6 +110,7 @@ export nodb
export overwrite
export preserve
export liquidsoap_keep_alive
export disable_auto_start_services
set +e
test "$mediamonitor" = "t" -o "$pypo" = "t" -o "$showrecorder" = "t"