add uninstall script
This commit is contained in:
parent
9cfd75232c
commit
77ed1b2f05
1 changed files with 22 additions and 0 deletions
22
uninstall.sh
Executable file
22
uninstall.sh
Executable 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} # || echo && echo "ERROR: couldn't change attributes on $chatlog" && exit 1
|
||||||
|
rm -rf $chatlogdir # || echo & echo "ERROR: couldn't remove $chatlogdir" & exit 1
|
||||||
|
rm ${installtarget}/heed
|
||||||
|
rm ${installtarget}/proclaim
|
||||||
|
rm ${installtarget}/scry
|
||||||
|
echo
|
||||||
|
echo "SUCCESS! bunkchat uninstalled"
|
Loading…
Reference in a new issue