Where in CentOS does program start at boot if it's not in init.d?

5,524

Edit the upstart file /etc/init/gitlab-runsvdir.conf and comment out the line start on runlevel [2345]

Resulting file /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

The line start on level [2345] is basically saying the script /opt/gitlab/embedded/bin/runsvdir-start will be executed on runlevels 2, 3, 4, and 5

After you have commented it out you can still manage the service using the following commands:

start gitlab-runsvdir # start the gitlab service

stop gitlab-runsvdir # stop the gitlab service

status gitlab-runsvdir # get status of gitlab service

Share:
5,524

Related videos on Youtube

PierreF
Author by

PierreF

Updated on September 18, 2022

Comments

  • PierreF
    PierreF almost 2 years

    I have installed a software (GitLab) on CentOS. It works well, but this GitLab starts at boot and I don't want that. So I took a look at /etc/init.d in order to disable it with chkconfig, but my problem is that there is no gitlab script in it, so I can't disable it.

    So here is my question: is there any other place in CentOS where I can find programs executed at CentOS start up? Or more directly, if someone knows how to disable GitLab from start up without using init.d, I am interested!