CC-4104: airtime-uninstall should not purge airtime database be default
-done
This commit is contained in:
parent
8dcb1f8f3d
commit
6a4fd4973e
2 changed files with 24 additions and 1 deletions
|
@ -6,6 +6,28 @@ if [[ $EUID -ne 0 ]]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
options=$(getopt -o p -l purge -- "$@")
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "only -p or --purge parameter allowed"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
eval set -- "$options"
|
||||||
|
|
||||||
|
purge='f'
|
||||||
|
|
||||||
|
while true
|
||||||
|
do
|
||||||
|
case "$1" in
|
||||||
|
-p|--purge) purge='t'; shift;;
|
||||||
|
--) shift 1; break ;;
|
||||||
|
*) break ;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
#Make 'purge' env variable available to sub bash script
|
||||||
|
export purge
|
||||||
|
|
||||||
echo -e "\n******************************* Uninstall Begin ********************************"
|
echo -e "\n******************************* Uninstall Begin ********************************"
|
||||||
|
|
||||||
# Absolute path to this script, e.g. /home/user/bin/foo.sh
|
# Absolute path to this script, e.g. /home/user/bin/foo.sh
|
||||||
|
|
|
@ -19,7 +19,6 @@ set +e
|
||||||
monit unmonitor airtime-media-monitor >/dev/null 2>&1
|
monit unmonitor airtime-media-monitor >/dev/null 2>&1
|
||||||
monit unmonitor airtime-liquidsoap >/dev/null 2>&1
|
monit unmonitor airtime-liquidsoap >/dev/null 2>&1
|
||||||
monit unmonitor airtime-playout >/dev/null 2>&1
|
monit unmonitor airtime-playout >/dev/null 2>&1
|
||||||
#monit unmonitor airtime-show-recorder >/dev/null 2>&1
|
|
||||||
monit unmonitor rabbitmq-server
|
monit unmonitor rabbitmq-server
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
@ -31,5 +30,7 @@ python $AIRTIMEROOT/python_apps/pypo/install/pypo-uninitialize.py
|
||||||
python $AIRTIMEROOT/python_apps/media-monitor/install/media-monitor-uninitialize.py
|
python $AIRTIMEROOT/python_apps/media-monitor/install/media-monitor-uninitialize.py
|
||||||
#python $AIRTIMEROOT/python_apps/show-recorder/install/recorder-uninitialize.py
|
#python $AIRTIMEROOT/python_apps/show-recorder/install/recorder-uninitialize.py
|
||||||
|
|
||||||
|
if [ "$purge" = "t" ]; then
|
||||||
#call Airtime uninstall script
|
#call Airtime uninstall script
|
||||||
php --php-ini ${SCRIPTPATH}/../airtime-php.ini ${SCRIPTPATH}/airtime-uninstall.php
|
php --php-ini ${SCRIPTPATH}/../airtime-php.ini ${SCRIPTPATH}/airtime-uninstall.php
|
||||||
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue