Files
tar1090/uninstall.sh

38 lines
995 B
Bash
Raw Normal View History

#!/bin/bash
2020-07-30 10:15:58 +08:00
instance=tar1090
2022-02-06 16:05:00 +01:00
echo --------------
if [[ -n $1 ]]; then
2020-04-10 22:50:12 +02:00
instance="tar1090-$1"
2021-07-01 07:22:35 +02:00
rm -rf "/usr/local/share/tar1090/html-$1"
2022-02-06 16:05:00 +01:00
echo "Removing tar1090, instance name $instance!"
else
2022-02-06 16:05:00 +01:00
echo "Removing tar1090, all instances!"
rm -rf /usr/local/share/tar1090
rm -f /etc/lighttpd/conf-available/*tar1090*
rm -f /etc/lighttpd/conf-enabled/*tar1090*
fi
echo --------------
2020-07-30 10:15:58 +08:00
systemctl stop "$instance"
systemctl disable "$instance"
#rm -f /etc/default/$instance
echo "Configuration is left to be removed manually, you can use this command:"
echo "sudo rm /etc/default/$instance"
2020-07-30 10:15:58 +08:00
rm -f "/lib/systemd/system/$instance.service"
2020-07-30 10:15:58 +08:00
rm -f "/etc/lighttpd/conf-available/88-$instance.conf"
rm -f "/etc/lighttpd/conf-enabled/88-$instance.conf"
rm -f "/etc/lighttpd/conf-available/99-$instance-webroot.conf"
rm -f "/etc/lighttpd/conf-enabled/99-$instance-webroot.conf"
systemctl daemon-reload
systemctl restart lighttpd
echo --------------
echo "tar1090 is now gone! Shoo shoo!"