Files
django_installer/reset.sh
2018-09-27 22:05:50 -04:00

30 lines
969 B
Bash
Executable File

################################################################################
# Performs a QUICK uninstall #
# - Does not uninstall dependencies #
# - Does not remove python #
################################################################################
# source vars
source ./vars
# remove nginx conf
tput setaf 2
echo "Disabling nginx"
tput setaf 9
systemctl stop nginx 1> /dev/null 2> /dev/null
systemctl disable nginx 1> /dev/null 2> /dev/null
rm -f /etc/nginx/conf.d/$projectname.conf
# remove gunicorn
tput setaf 2
echo "Uninstalling gunicorn"
tput setaf 9
systemctl disable gunicorn 1> /dev/null 2> /dev/null
systemctl stop gunicorn 1> /dev/null 2> /dev/null
rm -f /etc/systemd/system/gunicorn.service
# remove project
tput setaf 2
echo "Removing Django project"
tput setaf 9
rm -rf /home/$user/$projectname