Compare commits

..

1 commit

Author SHA1 Message Date
5514e64ba7 add uninstall script 2024-04-24 18:10:39 -04:00

22
uninstall.sh Executable file
View file

@ -0,0 +1,22 @@
#!/bin/sh -e
installtarget=/usr/local/bin
chatlogdir=/var/log/bunkchat
chatlog=chat.log
# check for root perms
if ! [ "$(id -u)" = 0 ]; then
echo
echo "ERROR: please run uninstall with root permissions"
exit 1
fi
echo
echo "uninstalling bunkchat"
chattr -a ${chatlogdir}/${chatlog} 2>/dev/null || echo && echo "ERROR: couldn't change attributes on $chatlog" && exit 1
rm -rf $chatlogdir 2>/dev/null || echo & echo "ERROR: couldn't remove $chatlogdir" & exit 1
rm ${installtarget}/heed
rm ${installtarget}/proclaim
rm ${installtarget}/scry
echo
echo "SUCCESS! bunkchat uninstalled"