remove Python install files

This commit is contained in:
ducoterra
2018-09-16 23:04:15 -04:00
parent e695c08569
commit bb8b4eec51
2 changed files with 6 additions and 5 deletions

View File

@@ -117,6 +117,7 @@ if [ $? -ne 0 ] ; then
fi fi
cd /root/ cd /root/
rm Python-3.7.0.tar.xz >> $pylogloc rm Python-3.7.0.tar.xz >> $pylogloc
rm Python-3.7.0 >> $pylogloc
if [ $? -ne 0 ] ; then if [ $? -ne 0 ] ; then
echo -e "Failed to remove Python tar file. $pylogmsg" echo -e "Failed to remove Python tar file. $pylogmsg"
fi fi
@@ -129,7 +130,7 @@ tput setaf 2
echo -e "Starting Django project" echo -e "Starting Django project"
tput setaf 0 tput setaf 0
adduser $user > /dev/null adduser $user 1> /dev/null 2> /dev/null
if [ ! -d "/home/$user" ] ; then if [ ! -d "/home/$user" ] ; then
mkdir /home/$user mkdir /home/$user
chown -R $user:$user /home/$user chown -R $user:$user /home/$user

View File

@@ -2,16 +2,16 @@
tput setaf 2 tput setaf 2
echo "Uninstalling nginx" echo "Uninstalling nginx"
tput setaf 0 tput setaf 0
systemctl stop nginx > /dev/null systemctl stop nginx 1> /dev/null 2> /dev/null
systemctl disable nginx > /dev/null systemctl disable nginx 1> /dev/null 2> /dev/null
rm -f /etc/nginx/conf.d/$projectname.conf rm -f /etc/nginx/conf.d/$projectname.conf
# remove gunicorn # remove gunicorn
tput setaf 2 tput setaf 2
echo "Uninstalling gunicorn" echo "Uninstalling gunicorn"
tput setaf 0 tput setaf 0
systemctl disable gunicorn > /dev/null systemctl disable gunicorn 1> /dev/null 2> /dev/null
systemctl stop gunicorn > /dev/null systemctl stop gunicorn 1> /dev/null 2> /dev/null
rm -f /etc/systemd/system/gunicorn.service rm -f /etc/systemd/system/gunicorn.service
# remove project # remove project