clouddreamai-cicd-setup 1.5.38 → 1.5.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -395,8 +395,13 @@ create_database() {
|
|
|
395
395
|
|
|
396
396
|
if [ "$PG_RESTART_NEEDED" = true ]; then
|
|
397
397
|
echo "重启 PostgreSQL 服务..."
|
|
398
|
-
|
|
399
|
-
|
|
398
|
+
# 宝塔 PostgreSQL 需要用 postgres 用户重启,且必须用 restart 而非 reload 才能让 listen_addresses 生效
|
|
399
|
+
if [ -x "/www/server/pgsql/bin/pg_ctl" ]; then
|
|
400
|
+
sudo -u postgres /www/server/pgsql/bin/pg_ctl restart -D /www/server/pgsql/data -m fast 2>/dev/null || true
|
|
401
|
+
else
|
|
402
|
+
systemctl restart postgresql 2>/dev/null || /etc/init.d/postgresql restart 2>/dev/null || true
|
|
403
|
+
fi
|
|
404
|
+
sleep 3
|
|
400
405
|
echo "✓ PostgreSQL 配置已更新"
|
|
401
406
|
fi
|
|
402
407
|
|