]> git.pld-linux.org Git - packages/gitlab-runner.git/commitdiff
initscript integration
authorElan Ruusamäe <glen@delfi.ee>
Fri, 4 Nov 2016 16:01:49 +0000 (18:01 +0200)
committerElan Ruusamäe <glen@delfi.ee>
Fri, 4 Nov 2016 16:01:49 +0000 (18:01 +0200)
gitlab-ci-multi-runner.service
gitlab-ci-multi-runner.spec

index 9bd226a78cc033ad7eed8ced18a17f709457306b..6985f30aeba280d9d145e5540908ff14202e25ca 100644 (file)
@@ -11,8 +11,8 @@ After=syslog.target network.target
 # http://0pointer.de/public/systemd-man/systemd.exec.html
 [Service]
 Type=simple
-User=gitlab_ci_multi_runner
-Group=gitlab_ci_multi_runner
+User=gitlab-runner
+Group=gitlab-runner
 ExecStart=/usr/bin/gitlab-ci-multi-runner run
 
 # if we crash, restart
index 440760c42ae962c0245f0f1e0380d4338ca7c24b..da2e6739066f170cf92c97f081d2f46ac2ecc714 100644 (file)
@@ -29,7 +29,9 @@ URL:          https://gitlab.com/gitlab-org/gitlab-ci-multi-runner
 BuildRequires: git-core
 %{?with_bindata:BuildRequires: go-bindata >= 3.0.7-1.a0ff2567}
 BuildRequires: golang >= 1.4
-BuildRequires: rpmbuild(macros) >= 1.202
+BuildRequires: rpmbuild(macros) >= 1.647
+Requires(post,preun):  /sbin/chkconfig
+Requires(post,preun,postun):   systemd-units >= 38
 Requires(postun):      /usr/sbin/groupdel
 Requires(postun):      /usr/sbin/userdel
 Requires(pre): /bin/id
@@ -40,6 +42,8 @@ Requires:     bash
 Requires:      ca-certificates
 Requires:      curl
 Requires:      git-core
+Requires:      rc-scripts
+Requires:      systemd-units >= 0.38
 Requires:      tar
 Suggests:      docker >= 1.8
 Provides:      group(gitlab-runner)
@@ -138,6 +142,19 @@ if [ "$1" = "0" ]; then
        %userremove gitlab-runner
        %groupremove gitlab-runner
 fi
+%systemd_reload
+
+%post
+/sbin/chkconfig --add %{name}
+%service %{name} restart
+%systemd_post %{name}.service
+
+%preun
+if [ "$1" = "0" ]; then
+       %service -q %{name} stop
+       /sbin/chkconfig --del %{name}
+fi
+%systemd_preun %{name}.service
 
 %files
 %defattr(644,root,root,755)
This page took 0.067632 seconds and 4 git commands to generate.