From f287ca3a96f29aea1e79d605ddc7fa7577e0aa6e Mon Sep 17 00:00:00 2001 From: oxaliq Date: Wed, 24 Apr 2024 17:03:46 -0400 Subject: [PATCH] add uninstall script --- uninstall.sh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100755 uninstall.sh diff --git a/uninstall.sh b/uninstall.sh new file mode 100755 index 0000000..eb59638 --- /dev/null +++ b/uninstall.sh @@ -0,0 +1,21 @@ +#!/bin/sh -e + +installtarget=/usr/local/bin +chatlog=/var/log/bunkchat/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 $chatlog || rm $chatlog || echo && echo "ERROR: couldn't mutate $chatlog" && exit 1 +rm $chatlog +rm $installtarget/heed +rm $installtarget/proclaim +rm $installtarget/scry +echo +echo "SUCCESS! bunkchat uninstalled"