13

I've installed gitlab on Ubuntu 14.04, from the following deb file:

gitlab_6.9.2-omnibus-1_amd64.deb

It works beautifully. But I want to perform some maintenance on the box without gitlab running, and I can't find anyway to do this.

There is nothing in cron, nothing in /etc/init.d that I can see.

All the documentation points to /home/gitlab as the root folder, where in mine it's /var/opt/gitlab and some others.

I see it's running nginx, postgres & redis. I can kill the individual components, and hopefully that would be enough, but I'd rather it shutdown cleanly, or just not start. These components are not part of the /etc/init.d system ...

Any ideas?

1

5 Answers 5

18

Found the answer. Most of the configuration appears to be in:

/var/opt/gitlab/gitlab-rails/etc

Whose config.yml file mentions gitlab-ctl, which is available everywhere as a command:

gitlab-ctl stop

Stops gitlab fully.

2
  • 6
    But how do I stop it loading at startup?
    – mjaggard
    Oct 20, 2015 at 13:52
  • These stay on after gitlab-ctl stop (how to kill>?) runsv gitlab-workhorse & runsv gitlab-monitor Jan 15, 2022 at 20:14
5

To disable gitlab from autostarting in ubuntu 14.04

echo manual | sudo tee /etc/init/gitlab-runsvdir.override

how does it work?

1
  • DANGER ZONE: this permanently corrupts your gitlab auto-startup. See below answers on how to restore. Nov 7, 2023 at 10:22
1

For those who want to reenable their gitlab autostart script and corrupted their
startup script like I did.
This is the default config of /etc/init/gitlab-runsvdir.override

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
1
  • Yes, this is the answere to re-enable it. Because after using the command mdma provided, you wont be able to re-enable gitlab because the default content of gitlab-runsvdir.override will be lost. I had this issue by reading this answere
    – leabut
    Sep 30, 2017 at 21:56
1

This command shows cleaner

$ sudo systemctl disable gitlab-runsvdir

0

For those who have /etc/inittab, check if it contains a line such as

CS:123456:respawn:/opt/gitlab/embedded/bin/runsvdir-start

and comment this line.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .