2016-08-26 15:23:05 +02:00
|
|
|
#!/sbin/openrc-run
|
2016-10-25 00:49:28 +02:00
|
|
|
# Copyright 2015-2016 Nicolas Heine
|
2015-06-29 17:40:09 +02:00
|
|
|
|
|
|
|
depend() {
|
2015-06-30 02:56:42 +02:00
|
|
|
after sshd
|
|
|
|
need net
|
|
|
|
need localmount
|
2015-06-29 17:40:09 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
start() {
|
2015-06-30 02:56:42 +02:00
|
|
|
ebegin "Starting gitlab-ci-multi-runner"
|
2015-06-30 03:36:58 +02:00
|
|
|
checkpath -d /var/run
|
2015-10-01 22:53:52 +02:00
|
|
|
checkpath -f -o @USER@ -m640 "${LOGFILE}"
|
2015-10-01 22:31:16 +02:00
|
|
|
start-stop-daemon --start -b -u @USER@ --chdir /opt/gitlab-ci-multi-runner --pidfile /var/run/gitlab-ci-multi-runner.pid -1 "${LOGFILE}" -2 "${LOGFILE}" --make-pidfile \
|
2015-06-30 02:56:42 +02:00
|
|
|
--exec /opt/gitlab-ci-multi-runner/gitlab-ci-multi-runner -- run
|
|
|
|
eend $?
|
2015-06-29 17:40:09 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
stop() {
|
2015-06-30 02:56:42 +02:00
|
|
|
ebegin "Stopping gitlab-ci-multi-runner"
|
|
|
|
start-stop-daemon --stop --pidfile /var/run/gitlab-ci-multi-runner.pid
|
|
|
|
eend $?
|
2015-06-29 17:40:09 +02:00
|
|
|
}
|