CC-2758: Make airtime-install script Debian/Ubuntu compatible
-uninstall script added
This commit is contained in:
parent
153e0df409
commit
56edfe4e68
15 changed files with 359 additions and 64 deletions
|
@ -1,53 +1,21 @@
|
|||
#!/bin/bash
|
||||
#!/bin/bash -e
|
||||
|
||||
#Check if root user
|
||||
if [ `whoami` != 'root' ]; then
|
||||
echo "Please run as root user."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
VIRTUAL_ENV_DIR="/usr/lib/airtime/airtime_virtualenv"
|
||||
if [ ! -d "$VIRTUAL_ENV_DIR" ]; then
|
||||
echo -e "\nAirtime is not installed, cannot uninstall.\n"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
virtualenv_bin="/usr/lib/airtime/airtime_virtualenv/bin/"
|
||||
. ${virtualenv_bin}activate
|
||||
|
||||
#Cause bash script to exit if any of the installers
|
||||
#return with a non-zero return value.
|
||||
set -e
|
||||
|
||||
# Absolute path to this script
|
||||
# Absolute path to this script, e.g. /home/user/bin/foo.sh
|
||||
SCRIPT=`readlink -f $0`
|
||||
# Absolute directory this script is in
|
||||
# Absolute path this script is in, thus /home/user/bin
|
||||
SCRIPTPATH=`dirname $SCRIPT`
|
||||
|
||||
echo -e "\n******************************* Uninstall Begin ********************************"
|
||||
#Uninitialize Airtime
|
||||
$SCRIPTPATH/include/airtime-uninitialize.sh
|
||||
|
||||
set +e
|
||||
monit unmonitor rabbitmq-server >/dev/null 2>&1
|
||||
set -e
|
||||
#Remove Airtime files
|
||||
$SCRIPTPATH/include/airtime-remove-files.sh
|
||||
|
||||
echo -e "\n*** Uninstalling Pypo ***"
|
||||
python ${SCRIPTPATH}/../python_apps/pypo/install/pypo-uninstall.py
|
||||
|
||||
echo -e "\n*** Uninstalling Show Recorder ***"
|
||||
python ${SCRIPTPATH}/../python_apps/show-recorder/install/recorder-uninstall.py
|
||||
|
||||
echo -e "\n*** Uninstalling Media Monitor ***"
|
||||
python ${SCRIPTPATH}/../python_apps/media-monitor/install/media-monitor-uninstall.py
|
||||
|
||||
echo -e "\n*** Uninstalling API Client ***"
|
||||
python ${SCRIPTPATH}/../python_apps/api_clients/install/api_client_uninstall.py
|
||||
|
||||
|
||||
echo -e "\n*** Removing Pypo User ***"
|
||||
python ${SCRIPTPATH}/../python_apps/remove-pypo-user.py
|
||||
|
||||
php ${SCRIPTPATH}/include/airtime-uninstall.php
|
||||
|
||||
echo -e "\n****************************** Uninstall Complete ******************************\n"
|
||||
echo "NOTE: To fully remove all Airtime files, you will also have to manually delete"
|
||||
echo " the directories '/srv/airtime'(default storage location of media files)"
|
||||
echo -e " and '/etc/airtime'(where the config files are stored).\n"
|
||||
#Remove pypo user
|
||||
python $SCRIPTPATH/../python_apps/remove-pypo-user.py
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue