thelinuxlist/scripts/gogsuninstall.sh

25 lines
580 B
Bash

#!/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