fix pid path mismatch

This commit is contained in:
Praveen Arimbrathodiyil 2016-02-15 23:03:46 +05:30
parent bb5383b4cf
commit 30705191ef
5 changed files with 22 additions and 3 deletions

3
debian/conf/gitlab vendored
View file

@ -59,6 +59,9 @@ mail_room_enabled=false
# The default is "$pid_path/mail_room.pid"
mail_room_pid_path="$pid_path/mail_room.pid"
# mail_room_logfile defines log file used by mailroom
mail_room_logfile="${gitlab_log_dir}/mail_room.log"
# shell_path defines the path of shell for "$app_user" in case you are using
# shell other than "bash"
# The default is "/bin/bash"

View file

@ -20,7 +20,7 @@ RuntimeDirectory=gitlab
RuntimeDirectoryMode=2750
EnvironmentFile=/etc/gitlab/gitlab-debian.conf
SyslogIdentifier=gitlab-mailroom
PIDFile=/run/gitlab/gitlab-mailroom.pid
PIDFile=/run/gitlab/mail_room.pid
Type=oneshot
RemainAfterExit=yes

View file

@ -21,7 +21,7 @@ RuntimeDirectory=gitlab
RuntimeDirectoryMode=2750
EnvironmentFile=/etc/gitlab/gitlab-debian.conf
SyslogIdentifier=gitlab-sidekiq
PIDFile=/run/gitlab/gitlab-sidekiq.pid
PIDFile=/run/gitlab/sidekiq.pid
ExecStart=/bin/sh bin/background_jobs start
ExecStop=/bin/sh bin/background_jobs stop

View file

@ -20,7 +20,7 @@ RuntimeDirectory=gitlab
RuntimeDirectoryMode=2750
EnvironmentFile=/etc/gitlab/gitlab-debian.conf
SyslogIdentifier=gitlab-unicorn
PIDFile=/run/gitlab/gitlab-unicorn.pid
PIDFile=/run/gitlab/unicorn.pid
ExecStart=/bin/sh bin/web start
ExecStop=/bin/sh bin/web stop

View file

@ -32,3 +32,19 @@ Index: gitlab/bin/web
get_unicorn_pid()
{
local pid=$(cat $unicorn_pidfile)
Index: gitlab/bin/mail_room
===================================================================
--- gitlab.orig/bin/mail_room
+++ gitlab/bin/mail_room
@@ -7,6 +7,11 @@ mail_room_pidfile="$app_root/tmp/pids/ma
mail_room_logfile="$app_root/log/mail_room.log"
mail_room_config="$app_root/config/mail_room.yml"
+# Read configuration variable file if it is present
+test -f /etc/default/gitlab && . /etc/default/gitlab
+
+mail_room_logfile=${mail_room_pid_path}
+
get_mail_room_pid()
{
local pid=$(cat $mail_room_pidfile)