Update install.sh

This commit is contained in:
midoks
2022-08-08 01:01:29 +08:00
parent 060fc535a9
commit 6666907155
+9 -9
View File
@@ -23,15 +23,15 @@ if [ ! -d $curPath/versions/$2 ];then
exit 0
fi
# if [ "${action}" == "uninstall" ];then
# if [ -f /usr/lib/systemd/system/postgresql.service ] || [ -f /lib/systemd/system/postgresql.service ];then
# systemctl stop postgresql
# systemctl disable postgresql
# rm -rf /usr/lib/systemd/system/postgresql.service
# rm -rf /lib/systemd/system/postgresql.service
# systemctl daemon-reload
# fi
# fi
if [ "${action}" == "uninstall" ];then
if [ -f /usr/lib/systemd/system/postgresql.service ] || [ -f /lib/systemd/system/postgresql.service ];then
systemctl stop postgresql
systemctl disable postgresql
rm -rf /usr/lib/systemd/system/postgresql.service
rm -rf /lib/systemd/system/postgresql.service
systemctl daemon-reload
fi
fi
sh -x $curPath/versions/$2/install.sh $1