matrix67
2021-01-18 13:37:18 +08:00
看下 systemd 的配置中,是咋配置的。
[Unit]
Description=GitLab Runner
After=syslog.target network.target
ConditionFileIsExecutable=/usr/local/bin/gitlab-runner
[Service]
StartLimitInterval=5
StartLimitBurst=10
ExecStart=/usr/local/bin/gitlab-runner "--debug" "run" "--working-directory" "/home/gitlab-runner" "--config" "/etc/gitlab-runner/config.toml" "--service" "gitlab-runner" "--syslog" "--user" "root"
Restart=always
RestartSec=120
[Install]
WantedBy=multi-user.target
------------------
直接命令行执行,也可以加是哪个用户的 --user
/usr/local/bin/gitlab-runner --debug run --working-directory /home/gitlab-runner --config /etc/gitlab-runner/config.toml --service gitlab-runner --syslog --user gitlab-runner
可以加上--debug 看下。