feat: 支持 NOGOSTC dcoker 环境变量 #204

This commit is contained in:
mofeng-git 2025-12-03 13:37:03 +08:00
parent c8305cc65d
commit 50c3e6a32a
2 changed files with 21 additions and 14 deletions

View File

@ -159,7 +159,7 @@ EOF
fi
if [ "$NOIPMI" == "1" ]; then
log_info "已禁用IPMI功能"
log_info "已禁用 IPMI 功能"
rm -r /usr/share/kvmd/extras/ipmi
else
cat >> /etc/kvmd/supervisord.conf << EOF
@ -177,6 +177,25 @@ redirect_stderr=true
EOF
fi
if [ "$NOGOSTC" == "1" ]; then
log_info "已禁用 GOSTC 功能"
rm -rf /usr/share/kvmd/extras/gostc
else
cat >> /etc/kvmd/supervisord.conf << EOF
[program:kvmd-gostc]
command=/usr/bin/gostc -web-addr 0.0.0.0:18080
autostart=true
autorestart=true
startsecs=5
priority=300
stopasgroup=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes = 0
redirect_stderr=true
EOF
fi
#switch OTG config
if [ "$OTG" == "1" ]; then
log_info "已启用 OTG 功能"
@ -278,4 +297,4 @@ if [ "$OTG" == "1" ]; then
fi
log_info "One-KVM 配置文件准备完成,正在启动服务..."
exec supervisord -c /etc/kvmd/supervisord.conf
exec supervisord -c /etc/kvmd/supervisord.conf

View File

@ -53,17 +53,6 @@ stdout_logfile=/dev/stdout
stdout_logfile_maxbytes = 0
redirect_stderr=true
[program:kvmd-gostc]
command=/usr/bin/gostc -web-addr 0.0.0.0:18080
autostart=true
autorestart=true
startsecs=5
priority=300
stopasgroup=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes = 0
redirect_stderr=true
[program:clean_when_exit]
command=/etc/kvmd/clean_when_exit.sh
autostart=true
@ -74,4 +63,3 @@ stopasgroup=true
stdout_logfile=/dev/stdout
stdout_logfile_maxbytes = 0
redirect_stderr=true