diff --git a/plugins/pgadmin/index.py b/plugins/pgadmin/index.py index 29c244823..fe172e0f9 100755 --- a/plugins/pgadmin/index.py +++ b/plugins/pgadmin/index.py @@ -200,7 +200,7 @@ def initReplace(): setCfg('password', password) mw.writeFile(pma_path, pass_cmd) - mw.execShell("python /www/server/pgadmin/run/lib/python3.10/site-packages/pgadmin4/setup.py add-user mw@gmail.com 123123") + #mw.execShell("python /www/server/pgadmin/run/lib/python3.10/site-packages/pgadmin4/setup.py add-user mw@gmail.com 123123") # systemd systemDir = mw.systemdCfgDir() diff --git a/plugins/pgadmin/install.sh b/plugins/pgadmin/install.sh index 240909fcd..ba99fea59 100755 --- a/plugins/pgadmin/install.sh +++ b/plugins/pgadmin/install.sh @@ -15,6 +15,8 @@ serverPath=$(dirname "$rootPath") P_VER=`python3 -V | awk '{print $2}'` echo "python:$P_VER" +# https://cn.linux-console.net/?p=6560 + # cd /Users/midoks/Desktop/mwdev/server/mdserver-web/plugins/pgadmin && bash install.sh install 4 # cd /www/server/mdserver-web/plugins/pgadmin && bash install.sh install 4 diff --git a/plugins/pgadmin/pg_init.sh b/plugins/pgadmin/pg_init.sh new file mode 100644 index 000000000..6b0e3fb42 --- /dev/null +++ b/plugins/pgadmin/pg_init.sh @@ -0,0 +1,12 @@ +#!/bin/expect -d +set timeout 20 + +spawn gunicorn --bind unix:/tmp/pgadmin4.sock \ +--workers=1 \ +--threads=25 \ +--chdir /www/server/pgadmin/run/lib/python3.10/site-packages/pgadmin4 pgAdmin4:app +expect { + "Email address:" { send "mdserver-web@gmail.com\r"; exp_continue } + "Password" { send "123123\r" } +} +expect eof