manage tmpfiles.d/gitlab.conf via ucf

This commit is contained in:
Praveen Arimbrathodiyil 2017-02-15 12:55:30 +05:30
parent e352a4ee97
commit 26cf41833b
4 changed files with 14 additions and 3 deletions

View file

@ -20,6 +20,9 @@ gitlab_shell_root=/usr/share/gitlab-shell
gitlab_shell_log=/var/log/gitlab-shell gitlab_shell_log=/var/log/gitlab-shell
gitlab_log_dir=/var/log/gitlab gitlab_log_dir=/var/log/gitlab
gitlab_pid_path=/run/gitlab gitlab_pid_path=/run/gitlab
gitlab_tmpfiles_example=/var/lib/gitlab/tmpfiles.d/gitlab.conf.example
gitlab_tmpfiles_private=/var/lib/gitlab/tmpfiles.d/gitlab.conf
gitlab_tmpfiles=/usr/lib/tmpfiles.d/gitlab.conf
nginx_user=www-data nginx_user=www-data
nginx_conf_example=/usr/share/doc/gitlab/nginx.conf.example nginx_conf_example=/usr/share/doc/gitlab/nginx.conf.example
nginx_ssl_conf_example_gz=/usr/share/doc/gitlab/nginx.ssl.conf.example.gz nginx_ssl_conf_example_gz=/usr/share/doc/gitlab/nginx.ssl.conf.example.gz

View file

@ -1,2 +1,2 @@
d /run/gitlab 2750 gitlab www-data - d /run/gitlab 2750 GITLAB_USER www-data -
L /run/gitlab/cache - - - - /var/cache/gitlab L /run/gitlab/cache - - - - /var/cache/gitlab

2
debian/install vendored
View file

@ -6,7 +6,7 @@ debian/conf/resque.yml etc/gitlab
debian/conf/gitlab-debian.conf.example usr/share/doc/gitlab debian/conf/gitlab-debian.conf.example usr/share/doc/gitlab
debian/conf/*.target lib/systemd/system debian/conf/*.target lib/systemd/system
debian/conf/smtp_settings.rb etc/gitlab/initializers debian/conf/smtp_settings.rb etc/gitlab/initializers
debian/conf/tmpfiles.d/gitlab.conf usr/lib/tmpfiles.d debian/conf/tmpfiles.d/gitlab.conf.example var/lib/gitlab/tmpfiles.d
debian/adduser.sh usr/lib/gitlab/scripts debian/adduser.sh usr/lib/gitlab/scripts
debian/grantpriv.sh usr/lib/gitlab/scripts debian/grantpriv.sh usr/lib/gitlab/scripts
debian/rake-tasks.sh usr/lib/gitlab/scripts debian/rake-tasks.sh usr/lib/gitlab/scripts

10
debian/postinst vendored
View file

@ -186,7 +186,15 @@ EOF
fi fi
fi fi
fi fi
# Manage tmpfiles.d/gitlab.conf via ucf
test -f ${gitlab_tmpfiles_private} || \
cp ${gitlab_tmpfiles_example} ${gitlab_tmpfiles_private}
sed -i "s/GITLAB_USER/${gitlab_user}/" ${gitlab_tmpfiles_private}
echo "Registering ${gitlab_tmpfiles} via ucf"
ucf --debconf-ok --three-way ${gitlab_tmpfiles_private} ${gitlab_tmpfiles}
ucfr gitlab ${gitlab_tmpfiles}
# Manage gitlab-shell's config.yml via ucf # Manage gitlab-shell's config.yml via ucf
mkdir -p /etc/gitlab-shell mkdir -p /etc/gitlab-shell
echo "Registering ${gitlab_shell_config} via ucf" echo "Registering ${gitlab_shell_config} via ucf"