fix: deploy.sh 使用 sudo -n 确保非交互式重载 PHP-FPM

这个提交包含在:
wikiboss
2026-09-12 16:59:06 +08:00
父节点 1249ee7da2
当前提交 573b18bcc9

查看文件

@@ -44,7 +44,7 @@ chmod -R 775 public/uploads 2>/dev/null || true
# 平滑重载 PHP-FPM 刷新 OPcache 字节码缓存
if [ -x "/etc/init.d/php-fpm-73" ]; then
if command -v sudo >/dev/null 2>&1; then
sudo /etc/init.d/php-fpm-73 reload >> "${LOG_FILE}" 2>&1 || true
sudo -n /etc/init.d/php-fpm-73 reload >> "${LOG_FILE}" 2>&1 || true
else
/etc/init.d/php-fpm-73 reload >> "${LOG_FILE}" 2>&1 || true
fi