glacier-old/UNINSTALL-GLACIER.sh

21 lines
922 B
Bash
Raw Normal View History

2022-03-09 17:40:37 -05:00
#!/bin/sh
2022-03-09 17:42:58 -05:00
# Require the script to be run as root
if [[ $(/usr/bin/id -u) -ne 0 ]]; then
echo "[ X ] Please run Glacier uninstallation as root."
exit
fi
2022-03-10 11:54:52 -05:00
echo "[ ! ] It is recommended to uninstall all Glacier packages before uninstalling Glacier."
2022-03-10 12:09:10 -05:00
echo "[ ! ] This will prevent untracked packages from remaining on your system and possibly creating a security risk."
echo "[ ! ] To see which packages are installed on your system, run the following command:"
echo "[ ! ] ls /etc/glacier/pkginfo"
while true; do
read -p "[ ? ] Would you like to uninstall Glacier?" yn
case $yn in
2022-04-05 09:49:32 -04:00
[Yy]* ) rm -rf /etc/glacier && rm -rf /var/cache/glacier && rm -rf /var/log/glacier && rm /bin/glacier-install && rm /bin/glacier-update && rm /bin/glacier-remove && rm /bin/glacier-query && rm /bin/glacier-help; break;;
2022-03-10 12:09:10 -05:00
[Nn]* ) exit;;
* ) echo "[ ! ] You must answer either yes or no.";;
esac
done