pull/624/head
Mr Chen 7 months ago
parent 055a52da03
commit b34d1e7caa
  1. 2
      plugins/pgadmin/init.d/pgadmin.service.tpl
  2. 17
      plugins/pgadmin/install.sh
  3. 1
      scripts/init.d/mw.tpl

@ -8,7 +8,7 @@ Description=pgadmin service
After=network.target
[Service]
ExecStart=gunicorn --bind unix:/tmp/pgadmin4.sock --workers=1 --threads=25 --chdir {$SERVER_PATH}/pgadmin/lib/python3.10/site-packages/pgadmin4 pgAdmin4:app
ExecStart=gunicorn --bind unix:/tmp/pgadmin4.sock --workers=1 --threads=25 --chdir {$SERVER_PATH}/pgadmin/run/lib/python3.10/site-packages/pgadmin4 pgAdmin4:app
ExecReload=/bin/kill -USR2 $MAINPID
PrivateTmp=false

@ -59,7 +59,7 @@ Install_pgadmin()
if version_lt "$P_VER" "3.8.0" ;then
echo 'Python版本太低,无法安装'
fi
PG_DIR=${serverPath}/pgadmin
PG_DIR=${serverPath}/pgadmin/run
mkdir -p $PG_DIR
echo "${1}" > ${serverPath}/pgadmin/version.pl
@ -89,6 +89,21 @@ Install_pgadmin()
Uninstall_pgadmin()
{
cd ${rootPath} && python3 ${rootPath}/plugins/pgadmin/index.py stop
if [ -f /usr/lib/systemd/system/pgadmin.service ];then
systemctl stop pgadmin
systemctl disable pgadmin
rm -rf /usr/lib/systemd/system/pgadmin.service
systemctl daemon-reload
fi
if [ -f /lib/systemd/system/pgadmin.service ];then
systemctl stop pgadmin
systemctl disable pgadmin
rm -rf /lib/systemd/system/pgadmin.service
systemctl daemon-reload
fi
rm -rf ${serverPath}/pgadmin
echo '卸载完成'
}

@ -429,7 +429,6 @@ mw_connect_mysql(){
mw_connect_pgdb(){
if [ ! -d "${ROOT_PATH}/postgresql" ];then
echo -e "postgresql not install!"
exit 1

Loading…
Cancel
Save