Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Gitlab autostart on boot

Tags:

gitlab

first of all I'm sorry for my english.

I've recently installed GitLab on a Debian 7.1 server, and don't start on boot. I've checked /etc/init.d, but there is no script for Gitlab.

How I can add Gitlab to startup?

I've used the Omnibus deb installer from download page, and if I run "gitlab-ctl start" works perfect.

Greetings and thanks!!

like image 605
ATIC TTU Avatar asked Jan 16 '15 11:01

ATIC TTU


2 Answers

systemctl enable gitlab-runsvdir

If your system is using systemd (RHEL/CentOS 7) instead of init; This is easier :)

 [meebo@server ~]# sudo systemctl enable gitlab-runsvdir
 Created symlink from /etc/systemd/system/basic.target.wants/gitlab-
 runsvdir.service to /usr/lib/systemd/system/gitlab-runsvdir.service.
like image 125
beepy Avatar answered Oct 03 '22 07:10

beepy


On CentOS 7, There is a symbolic link,

/etc/systemd/system/default.target.wants/gitlab-runsvdir.service -> /opt/gitlab/embedded/cookbooks/runit/files/default/gitlab-runsvdir.service

And the content of gitlab-runsvdir.service is as like this

[Unit] Description=GitLab Runit supervision process

[Service] ExecStart=/opt/gitlab/embedded/bin/runsvdir-start
Restart=always

I hope there is a similar in Debian 7.

like image 22
Shoji Urashita Avatar answered Oct 03 '22 07:10

Shoji Urashita