From 854d1de54a879e38e64841b6ca7ff4f838f8693d Mon Sep 17 00:00:00 2001 From: midoks Date: Wed, 29 Jun 2022 01:07:25 +0800 Subject: [PATCH] Update install.sh --- plugins/openresty/install.sh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/plugins/openresty/install.sh b/plugins/openresty/install.sh index 564a40236..cf9ed6f59 100755 --- a/plugins/openresty/install.sh +++ b/plugins/openresty/install.sh @@ -50,17 +50,27 @@ Install_openresty() if [ -d $serverPath/openresty ];then echo "${VERSION}" > $serverPath/openresty/version.pl echo "" > $serverPath/web_conf/php/conf/enable-php-00.conf + + #初始化 + cd ${rootPath} && python3 ${rootPath}/plugins/openresty/index.py start ${VERSION} + cd ${rootPath} && python3 ${rootPath}/plugins/openresty/index.py initd_install ${VERSION} fi echo '安装完成' > $install_tmp } Uninstall_openresty() { - rm -rf $serverPath/openresty - + + if [ -f $serverPath/openresty/init.d/openresty ];then + $serverPath/openresty/init.d/openresty stop + fi + if [ -f /lib/systemd/system/openresty.service ];then + systemctl stop openresty rm -rf /lib/systemd/system/openresty.service fi + + rm -rf $serverPath/openresty echo '卸载完成' > $install_tmp }