[DRE-commits] [gitlab] 01/01: use RuntimeDirectory option

Praveen Arimbrathodiyil praveen at moszumanska.debian.org
Mon Feb 15 13:47:22 UTC 2016


This is an automated email from the git hooks/post-receive script.

praveen pushed a commit to branch master
in repository gitlab.

commit 6023c3251772e01fedf6ea135f497b75df34fb1c
Author: Praveen Arimbrathodiyil <praveen at debian.org>
Date:   Mon Feb 15 19:00:37 2016 +0530

    use RuntimeDirectory option
---
 debian/conf/gitlab                   | 4 ++--
 debian/conf/gitlab-mailroom.service  | 6 +++---
 debian/conf/gitlab-sidekiq.service   | 5 +++--
 debian/conf/gitlab-unicorn.service   | 5 +++--
 debian/conf/gitlab-workhorse.service | 8 ++++----
 debian/conf/unicorn.rb               | 4 ++--
 6 files changed, 17 insertions(+), 15 deletions(-)

diff --git a/debian/conf/gitlab b/debian/conf/gitlab
index 288be9d..8427837 100755
--- a/debian/conf/gitlab
+++ b/debian/conf/gitlab
@@ -24,11 +24,11 @@ app_root=${gitlab_home}
 # pid_path defines a folder in which the gitlab and it's components place their pids.
 # This variable is also used below to define the relevant pids for the gitlab components.
 # The default is "$app_root/tmp/pids"
-pid_path="${gitlab_pid_path}/pids"
+pid_path="${gitlab_pid_path}"
 
 # socket_path defines the folder in which gitlab places the sockets
 #The default is "$app_root/tmp/sockets"
-socket_path="${gitlab_pid_path}/sockets"
+socket_path="${gitlab_pid_path}"
 
 # web_server_pid_path defines the path in which to create the pid file fo the web_server
 # The default is "$pid_path/unicorn.pid"
diff --git a/debian/conf/gitlab-mailroom.service b/debian/conf/gitlab-mailroom.service
index 269189e..bddb632 100644
--- a/debian/conf/gitlab-mailroom.service
+++ b/debian/conf/gitlab-mailroom.service
@@ -16,14 +16,14 @@ After=gitlab-unicorn.service
 [Service]
 User=gitlab
 WorkingDirectory=/usr/share/gitlab
+RuntimeDirectory=gitlab
+RuntimeDirectoryMode=2750
 EnvironmentFile=/etc/gitlab/gitlab-debian.conf
 SyslogIdentifier=gitlab-mailroom
-PIDFile=/usr/share/gitlab/tmp/pids/gitlab-mailroom.pid
+PIDFile=/run/gitlab/gitlab-mailroom.pid
 Type=oneshot
 RemainAfterExit=yes
 
-ExecStartPre=/usr/bin/install -o gitlab -g gitlab -m 2750 -d /var/run/gitlab/pids
-ExecStartPre=/usr/bin/install -o gitlab -g gitlab -m 2750 -d /var/run/gitlab/sockets
 ExecStart=/usr/share/gitlab/bin/mail_room start
 ExecStop=/usr/share/gitlab/bin/mail_room stop
 
diff --git a/debian/conf/gitlab-sidekiq.service b/debian/conf/gitlab-sidekiq.service
index 9cf81a8..67121de 100644
--- a/debian/conf/gitlab-sidekiq.service
+++ b/debian/conf/gitlab-sidekiq.service
@@ -17,11 +17,12 @@ After=redis.service postgresql.service
 Type=forking
 User=gitlab
 WorkingDirectory=/usr/share/gitlab
+RuntimeDirectory=gitlab
+RuntimeDirectoryMode=2750
 EnvironmentFile=/etc/gitlab/gitlab-debian.conf
 SyslogIdentifier=gitlab-sidekiq
+PIDFile=/run/gitlab/gitlab-sidekiq.pid
 
-ExecStartPre=/usr/bin/install -o gitlab -g gitlab -m 2750 -d /var/run/gitlab/pids
-ExecStartPre=/usr/bin/install -o gitlab -g gitlab -m 2750 -d /var/run/gitlab/sockets
 ExecStart=/bin/sh bin/background_jobs start
 ExecStop=/bin/sh bin/background_jobs stop
 
diff --git a/debian/conf/gitlab-unicorn.service b/debian/conf/gitlab-unicorn.service
index 403ccce..867736a 100644
--- a/debian/conf/gitlab-unicorn.service
+++ b/debian/conf/gitlab-unicorn.service
@@ -16,11 +16,12 @@ After=redis.service postgresql.service
 [Service]
 User=gitlab
 WorkingDirectory=/usr/share/gitlab
+RuntimeDirectory=gitlab
+RuntimeDirectoryMode=2750
 EnvironmentFile=/etc/gitlab/gitlab-debian.conf
 SyslogIdentifier=gitlab-unicorn
+PIDFile=/run/gitlab/gitlab-unicorn.pid
 
-ExecStartPre=/usr/bin/install -o gitlab -g gitlab -m 2750 -d /var/run/gitlab/pids
-ExecStartPre=/usr/bin/install -o gitlab -g gitlab -m 2750 -d /var/run/gitlab/sockets
 ExecStart=/bin/sh bin/web start
 ExecStop=/bin/sh bin/web stop
 
diff --git a/debian/conf/gitlab-workhorse.service b/debian/conf/gitlab-workhorse.service
index 80544e7..a4521ea 100644
--- a/debian/conf/gitlab-workhorse.service
+++ b/debian/conf/gitlab-workhorse.service
@@ -17,13 +17,13 @@ After=gitlab-unicorn.service
 Type=forking
 User=gitlab
 WorkingDirectory=/usr/share/gitlab
+RuntimeDirectory=gitlab
+RuntimeDirectoryMode=2750
 EnvironmentFile=/etc/gitlab/gitlab-debian.conf
 SyslogIdentifier=gitlab-workhorse
-PIDFile=/var/run/gitlab/pids/gitlab-workhorse.pid
+PIDFile=/run/gitlab/gitlab-workhorse.pid
 
-ExecStartPre=/usr/bin/install -o gitlab -g gitlab -m 2750 -d /var/run/gitlab/pids
-ExecStartPre=/usr/bin/install -o gitlab -g gitlab -m 2750 -d /var/run/gitlab/sockets
-ExecStart=/usr/share/gitlab/bin/daemon_with_pidfile /var/run/gitlab/pids/gitlab-workhorse.pid gitlab-workhorse -listenUmask 0 -listenNetwork unix -listenAddr /var/run/gitlab/sockets/gitlab-workhorse.socket -authBackend http://127.0.0.1:8080 -authSocket /var/run/gitlab/sockets/gitlab.socket -documentRoot /usr/share/gitlab/public >>/var/log/gitlab/gitlab-workhorse.log 2>&1
+ExecStart=/usr/share/gitlab/bin/daemon_with_pidfile /run/gitlab/pids/gitlab-workhorse.pid gitlab-workhorse -listenUmask 0 -listenNetwork unix -listenAddr /run/gitlab/sockets/gitlab-workhorse.socket -authBackend http://127.0.0.1:8080 -authSocket /run/gitlab/sockets/gitlab.socket -documentRoot /usr/share/gitlab/public >>/var/log/gitlab/gitlab-workhorse.log 2>&1
 
 [Install]
 WantedBy=multi-user.target
diff --git a/debian/conf/unicorn.rb b/debian/conf/unicorn.rb
index 40b545e..879df7e 100644
--- a/debian/conf/unicorn.rb
+++ b/debian/conf/unicorn.rb
@@ -35,7 +35,7 @@ working_directory ENV['gitlab_home'] # available in 0.94.0+
 # Listen on both a Unix domain socket and a TCP port.
 # If you are load-balancing multiple Unicorn masters, lower the backlog
 # setting to e.g. 64 for faster failover.
-listen "#{ENV['gitlab_pid_path']}/sockets/gitlab.socket", :backlog => 1024
+listen "#{ENV['gitlab_pid_path']}/gitlab.socket", :backlog => 1024
 listen "127.0.0.1:8080", :tcp_nopush => true
 
 # nuke workers after 30 seconds instead of 60 seconds (the default)
@@ -56,7 +56,7 @@ listen "127.0.0.1:8080", :tcp_nopush => true
 timeout 60
 
 # feel free to point this anywhere accessible on the filesystem
-pid "#{ENV['gitlab_pid_path']}/pids/unicorn.pid"
+pid "#{ENV['gitlab_pid_path']}/unicorn.pid"
 
 # By default, the Unicorn logger will write to stderr.
 # Additionally, some applications/frameworks log to stderr or stdout,

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-ruby-extras/gitlab.git



More information about the Pkg-ruby-extras-commits mailing list