24 lines
666 B
Text
24 lines
666 B
Text
|
#!/sbin/openrc-run
|
||
|
# Copyright 2015-2017 Nicolas Heine
|
||
|
|
||
|
depend() {
|
||
|
after sshd
|
||
|
need net
|
||
|
need localmount
|
||
|
}
|
||
|
|
||
|
start() {
|
||
|
ebegin "Starting gitlab-runner"
|
||
|
checkpath -d /var/run
|
||
|
checkpath -f -o ${USER} -m640 "${LOGFILE}"
|
||
|
start-stop-daemon --start -b -u ${USER} --chdir "${HOME_DIR}" --pidfile /var/run/gitlab-runner.pid -1 "${LOGFILE}" -2 "${LOGFILE}" --make-pidfile \
|
||
|
--exec /usr/bin/gitlab-runner -- run --config /etc/gitlab-runner/config.toml
|
||
|
eend $?
|
||
|
}
|
||
|
|
||
|
stop() {
|
||
|
ebegin "Stopping gitlab-runner"
|
||
|
start-stop-daemon --stop --pidfile /var/run/gitlab-runner.pid
|
||
|
eend $?
|
||
|
}
|