From 900b20400e54e0e974f69f78628d2ca1b87581b4 Mon Sep 17 00:00:00 2001 From: Kyle Robbertze Date: Mon, 3 Aug 2020 12:25:05 +0200 Subject: [PATCH] rename Airtime to LibreTime --- uninstall | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/uninstall b/uninstall index 2c21d0307..8255519b8 100755 --- a/uninstall +++ b/uninstall @@ -18,7 +18,7 @@ EOF` echo $result } -dropAirtimeDatabase() { +dropLibreTimeDatabase() { # here-doc to execute this block as postgres user su postgres <<'EOF' set +e @@ -31,7 +31,7 @@ dropAirtimeDatabase() { EOF } -removeRabbitmqAirtimeSettings() { +removeRabbitmqLibreTimeSettings() { if [ -f /etc/airtime/airtime.conf ]; then 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) @@ -55,6 +55,7 @@ FILES=( "/usr/lib/airtime" "/usr/share/airtime" "/etc/init/airtime*" + "/etc/systemd/system/libretime*" "/usr/local/bin/airtime-*" "/usr/bin/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 "\nThis will *permanently* remove Airtime 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" +echo -e "\nThis will *permanently* remove LibreTime and all related files from your computer. \ +Any files in LibreTime directories and subdirectories will be deleted. Are you sure you want to proceed? [y/N]: \c" read IN if [[ ! ( "$IN" = "y" || "$IN" = "Y" ) ]]; then exit 0 @@ -86,21 +87,21 @@ else echo -e "\nNo stor directory found, skipping..." fi -echo -e "\nUninstalling Airtime..." -service airtime-celery stop +echo -e "\nUninstalling LibreTime..." +systemctl stop libretime-celery set +e -removeRabbitmqAirtimeSettings +removeRabbitmqLibreTimeSettings set -e for i in ${FILES[*]}; do rm -rf $i 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 if [[ "$IN" = "y" || "$IN" = "Y" ]]; then - echo -e "\nDropping Airtime database..." - dropAirtimeDatabase + echo -e "\nDropping LibreTime database..." + dropLibreTimeDatabase fi pip3 uninstall -y airtime-playout airtime-media-monitor airtime-analyzer