commit e17ca829874131ff9dc11e4b82e3c39d2faf35da
Author: Elan Ruusamäe <[email protected]>
Date:   Thu May 26 23:22:56 2016 +0300

    add sysv initscripts scriptlets

 gitlab-ce.spec | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)
---
diff --git a/gitlab-ce.spec b/gitlab-ce.spec
index 9b26650..8fa06dd 100644
--- a/gitlab-ce.spec
+++ b/gitlab-ce.spec
@@ -46,13 +46,16 @@ BuildRequires:      libxml2-devel
 BuildRequires: mysql-devel
 BuildRequires: postgresql-devel
 BuildRequires: rpm-rubyprov
+BuildRequires: rpmbuild(macros) >= 1.228
 BuildRequires: ruby-bundler
 BuildRequires: ruby-devel >= 1:2.1.0
 BuildRequires: zlib-devel
+Requires(post,preun):  /sbin/chkconfig
 Requires:      apache-base
 Requires:      git-core >= 2.7.4
 Requires:      gitlab-shell >= 2.7.2
 Requires:      nodejs
+Requires:      rc-scripts
 Requires:      ruby-bundler
 Suggests:      mysql
 Suggests:      redis-server
@@ -200,6 +203,11 @@ install -p %{SOURCE11} 
$RPM_BUILD_ROOT%{_sbindir}/gitlab-ctl
 rm -rf "$RPM_BUILD_ROOT"
 
 %post
+/sbin/chkconfig --add gitlab-sidekiq
+/sbin/chkconfig --add gitlab-unicorn
+%service gitlab-sidekiq restart
+%service gitlab-unicorn restart
+
 if [ $1 -ge 1 ]; then
        systemctl -q daemon-reload
        systemd-tmpfiles --create %{systemdtmpfilesdir}/gitlab.conf
@@ -220,6 +228,14 @@ else
        systemctl -q try-start gitlab-sidekiq || :
 fi
 
+%preun
+if [ "$1" = "0" ]; then
+       %service -q gitlab-sidekiq stop
+       %service -q gitlab-unicorn stop
+       /sbin/chkconfig --del gitlab-sidekiq
+       /sbin/chkconfig --del gitlab-unicorn
+fi
+
 %postun
 if [ $1 -eq 0 ]; then
        %userremove gitlab
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/gitlab-ce.git/commitdiff/e17ca829874131ff9dc11e4b82e3c39d2faf35da

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to