diff --git a/scripts/gogsuninstall.sh b/scripts/gogsuninstall.sh new file mode 100644 index 0000000..1f0bf37 --- /dev/null +++ b/scripts/gogsuninstall.sh @@ -0,0 +1,25 @@ +#!/bin/bash +while true +do + read -r -p "Would you like to install Gogs? This is not reversible. [Y/n] " input + + case $input in + [yY][eE][sS]|[yY]) + break + ;; + [nN][oO]|[nN]) + break + ;; + *) + echo "That wasn't an option..." + ;; + esac +done + +sudo systemctl stop gogs +sudo systemctl disable gogs +rm -rf /etc/systemd/system/gogs.service +sudo userdel git +sudo rm -rf /home/git +sudo rm -rf /var/log/gogs/* +sudo ufw delete allow 3000 \ No newline at end of file