#!/bin/sh -e installtarget=/usr/local/bin # check for root perms if ! [ "$(id -u)" = 0 ]; then echo echo "ERROR: please run install with root permissions" exit 1 fi echo echo "uninstalling bunkdeck" echo printf "also uninstall bunkchat commands? (y/N): " read -r response case $response in n) rm ${installtarget}/bunkdeck ;; "") rm ${installtarget}/bunkdeck ;; y) (../bunkchat/uninstall.sh) # 2>/dev/null || \ # echo && echo "ERROR: couldn't run bunkchat uninstall script" && exit 1 rm ${installtarget}/bunkdeck ;; *) echo echo "ERROR: invalid response" exit 1 ;; esac echo echo "SUCCESS: bunkdeck uninstalled" echo " remember to clean up crontab /root/crontab-scripts/delete-bunkchat.sh" exit 0