gentoo-overlay/dev-vcs/gitlab-ci-multi-runner/files/gitlab-ci-multi-runner.init
Manuel Friedli 9edf4ac4c7 dev-vcs/gitlab-ci-multi-runner:
install init script, set up required directories ... taken from gitlab-ci-multi-runner-bin

Package-Manager: portage-2.3.0
2016-10-25 23:27:27 +02:00

23 lines
662 B
Text

#!/sbin/openrc-run
# Copyright 2015-2016 Nicolas Heine
depend() {
after sshd
need net
need localmount
}
start() {
ebegin "Starting gitlab-ci-multi-runner"
checkpath -d /var/run
checkpath -f -o @USER@ -m640 "${LOGFILE}"
start-stop-daemon --start -b -u @USER@ --chdir @HOME@ --pidfile /var/run/gitlab-ci-multi-runner.pid -1 "${LOGFILE}" -2 "${LOGFILE}" --make-pidfile \
--exec /usr/bin/gitlab-ci-multi-runner -- run
eend $?
}
stop() {
ebegin "Stopping gitlab-ci-multi-runner"
start-stop-daemon --stop --pidfile /var/run/gitlab-ci-multi-runner.pid
eend $?
}