fix uninstall message
This commit is contained in:
19
uninstall.sh
Normal file → Executable file
19
uninstall.sh
Normal file → Executable file
@@ -1,26 +1,31 @@
|
|||||||
# remove nginx conf
|
# remove nginx conf
|
||||||
systemctl disable nginx
|
echo "Uninstalling nginx"
|
||||||
|
systemctl stop nginx > /dev/null
|
||||||
|
systemctl disable nginx > /dev/null
|
||||||
rm -f /etc/nginx/conf.d/$projectname.conf
|
rm -f /etc/nginx/conf.d/$projectname.conf
|
||||||
|
|
||||||
# remove gunicorn
|
# remove gunicorn
|
||||||
systemctl disable gunicorn
|
echo "Uninstalling gunicorn"
|
||||||
systemctl stop gunicorn
|
systemctl disable gunicorn > /dev/null
|
||||||
|
systemctl stop gunicorn > /dev/null
|
||||||
rm -f /etc/systemd/system/gunicorn.service
|
rm -f /etc/systemd/system/gunicorn.service
|
||||||
|
|
||||||
# remove project
|
# remove project
|
||||||
|
echo "Removing Django project"
|
||||||
rm -rf /home/$user/$projectname
|
rm -rf /home/$user/$projectname
|
||||||
|
|
||||||
# remove python
|
# remove python
|
||||||
|
echo "Uninstalling python"
|
||||||
rm -rf $pyinstalldir
|
rm -rf $pyinstalldir
|
||||||
|
|
||||||
# remove yum dependencies
|
# remove yum dependencies
|
||||||
|
echo "Uninstalling dependencies"
|
||||||
packages=(gcc wget nginx libsqlite3x-devel.x86_64 postgresql-server postgresql-devel postgresql-contrib bzip2-devel zlib-devel libffi-devel openssl-devel policycoreutils-python.x86_64)
|
packages=(gcc wget nginx libsqlite3x-devel.x86_64 postgresql-server postgresql-devel postgresql-contrib bzip2-devel zlib-devel libffi-devel openssl-devel policycoreutils-python.x86_64)
|
||||||
for package in ${packages[@]};
|
for package in ${packages[@]};
|
||||||
do
|
do
|
||||||
echo -e "\tInstalling $package"
|
echo -e "\tRemoving $package"
|
||||||
yum -y erase $package 1>> $yumlogloc 2>> $yumlogloc 3>> $yumlogloc
|
yum -y erase $package 1>> /dev/null 2>> /dev/null 3>> /dev/null
|
||||||
if [ $? -ne 0 ] ; then
|
if [ $? -ne 0 ] ; then
|
||||||
echo -e "yum failed to remove $package. $yumlogmsg"
|
echo -e "\tyum failed to remove $package."
|
||||||
exit 1
|
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
Reference in New Issue
Block a user