小智 5
编辑upstart文件/etc/init/gitlab-runsvdir.conf并注释掉该行start on runlevel [2345]
结果文件/etc/init/gitlab-runsvdir.conf:
#start on runlevel [2345]
stop on shutdown
respawn
post-stop script
# To avoid stomping on runsv's owned by a different runsvdir
# process, kill any runsv process that has been orphaned, and is
# now owned by init (process 1).
pkill -HUP -P 1 runsv$
end script
exec /opt/gitlab/embedded/bin/runsvdir-start
Run Code Online (Sandbox Code Playgroud)
该行start on level [2345]基本上是说脚本/opt/gitlab/embedded/bin/runsvdir-start将在运行级别2、3、4 和 5 上执行
注释掉之后,您仍然可以使用以下命令管理服务:
start gitlab-runsvdir # start the gitlab service
stop gitlab-runsvdir # stop the gitlab service
status gitlab-runsvdir # get status of gitlab service
| 归档时间: |
|
| 查看次数: |
5500 次 |
| 最近记录: |