mirror of
https://gitee.com/ulthon/ulthon_admin.git
synced 2026-07-01 15:32:48 +08:00
fix(docker): 修复定时器进程因 www-data nologin shell 无法启动的问题
www-data 用户默认 shell 为 /usr/sbin/nologin,导致 su - www-data -c 被拒绝, 定时器从未启动,主机节点心跳不上报。改用 su -s /bin/bash 指定 shell, 并将定时器日志输出到 runtime/timer.log 方便排查。
This commit is contained in:
@@ -27,7 +27,7 @@ echo "参数为:$@"
|
||||
|
||||
if [ "$1" = "server" ] || [ "$1" = "" ]; then
|
||||
# 运行定时任务 TODO:以指定用户运行
|
||||
su - www-data -c "nohup php /var/www/html/think timer --local --quit &"
|
||||
su -s /bin/bash www-data -c "nohup php /var/www/html/think timer --local --quit > /var/www/html/runtime/timer.log 2>&1 &"
|
||||
# 运行nginx
|
||||
service nginx start
|
||||
# 运行php-fpm
|
||||
|
||||
Reference in New Issue
Block a user