From 66669071550117e694dddd266495c15c2a359bc2 Mon Sep 17 00:00:00 2001 From: midoks Date: Mon, 8 Aug 2022 01:01:29 +0800 Subject: [PATCH] Update install.sh --- plugins/postgresql/install.sh | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/plugins/postgresql/install.sh b/plugins/postgresql/install.sh index 741fc3540..0e64845db 100755 --- a/plugins/postgresql/install.sh +++ b/plugins/postgresql/install.sh @@ -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