Merge pull request #1080 from paddatrapper/uninstall
Rename Airtime to LibreTime in Uninstall script
This commit is contained in:
commit
5ac18aa4e1
21
uninstall
21
uninstall
|
@ -18,7 +18,7 @@ EOF`
|
||||||
echo $result
|
echo $result
|
||||||
}
|
}
|
||||||
|
|
||||||
dropAirtimeDatabase() {
|
dropLibreTimeDatabase() {
|
||||||
# here-doc to execute this block as postgres user
|
# here-doc to execute this block as postgres user
|
||||||
su postgres <<'EOF'
|
su postgres <<'EOF'
|
||||||
set +e
|
set +e
|
||||||
|
@ -31,7 +31,7 @@ dropAirtimeDatabase() {
|
||||||
EOF
|
EOF
|
||||||
}
|
}
|
||||||
|
|
||||||
removeRabbitmqAirtimeSettings() {
|
removeRabbitmqLibreTimeSettings() {
|
||||||
if [ -f /etc/airtime/airtime.conf ]; then
|
if [ -f /etc/airtime/airtime.conf ]; then
|
||||||
RMQ_VHOST=$(awk -F ' = ' '{if (! ($0 ~ /^;/) && $0 ~ /^vhost/ ) print $2}' /etc/airtime/airtime.conf)
|
RMQ_VHOST=$(awk -F ' = ' '{if (! ($0 ~ /^;/) && $0 ~ /^vhost/ ) print $2}' /etc/airtime/airtime.conf)
|
||||||
RMQ_USER=$(awk -F ' = ' '{if (! ($0 ~ /^;/) && $0 ~ /^user/ ) print $2}' /etc/airtime/airtime.conf)
|
RMQ_USER=$(awk -F ' = ' '{if (! ($0 ~ /^;/) && $0 ~ /^user/ ) print $2}' /etc/airtime/airtime.conf)
|
||||||
|
@ -55,6 +55,7 @@ FILES=(
|
||||||
"/usr/lib/airtime"
|
"/usr/lib/airtime"
|
||||||
"/usr/share/airtime"
|
"/usr/share/airtime"
|
||||||
"/etc/init/airtime*"
|
"/etc/init/airtime*"
|
||||||
|
"/etc/systemd/system/libretime*"
|
||||||
"/usr/local/bin/airtime-*"
|
"/usr/local/bin/airtime-*"
|
||||||
"/usr/bin/airtime*"
|
"/usr/bin/airtime*"
|
||||||
"/etc/apache2/sites-available/airtime*"
|
"/etc/apache2/sites-available/airtime*"
|
||||||
|
@ -69,8 +70,8 @@ echo "pip3 airtime-playout"
|
||||||
|
|
||||||
echo -e "\nIf your web root is not listed, you will need to manually remove it."
|
echo -e "\nIf your web root is not listed, you will need to manually remove it."
|
||||||
|
|
||||||
echo -e "\nThis will *permanently* remove Airtime and all related files from your computer. \
|
echo -e "\nThis will *permanently* remove LibreTime and all related files from your computer. \
|
||||||
Any files in Airtime directories and subdirectories will be deleted. Are you sure you want to proceed? [y/N]: \c"
|
Any files in LibreTime directories and subdirectories will be deleted. Are you sure you want to proceed? [y/N]: \c"
|
||||||
read IN
|
read IN
|
||||||
if [[ ! ( "$IN" = "y" || "$IN" = "Y" ) ]]; then
|
if [[ ! ( "$IN" = "y" || "$IN" = "Y" ) ]]; then
|
||||||
exit 0
|
exit 0
|
||||||
|
@ -86,21 +87,21 @@ else
|
||||||
echo -e "\nNo stor directory found, skipping..."
|
echo -e "\nNo stor directory found, skipping..."
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo -e "\nUninstalling Airtime..."
|
echo -e "\nUninstalling LibreTime..."
|
||||||
service airtime-celery stop
|
systemctl stop libretime-celery
|
||||||
set +e
|
set +e
|
||||||
removeRabbitmqAirtimeSettings
|
removeRabbitmqLibreTimeSettings
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
for i in ${FILES[*]}; do
|
for i in ${FILES[*]}; do
|
||||||
rm -rf $i
|
rm -rf $i
|
||||||
done
|
done
|
||||||
|
|
||||||
echo -e "\nDo you want to drop your current Airtime database? [y/N]: \c"
|
echo -e "\nDo you want to drop your current LibreTime database? [y/N]: \c"
|
||||||
read IN
|
read IN
|
||||||
if [[ "$IN" = "y" || "$IN" = "Y" ]]; then
|
if [[ "$IN" = "y" || "$IN" = "Y" ]]; then
|
||||||
echo -e "\nDropping Airtime database..."
|
echo -e "\nDropping LibreTime database..."
|
||||||
dropAirtimeDatabase
|
dropLibreTimeDatabase
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pip3 uninstall -y airtime-playout airtime-media-monitor airtime-analyzer
|
pip3 uninstall -y airtime-playout airtime-media-monitor airtime-analyzer
|
||||||
|
|
Loading…
Reference in New Issue