sys-cluster/nomad/files/nomad.initd
author Da Risk <da_risk@geekorum.com>
Sat, 16 Jan 2021 19:42:13 -0400
changeset 239 793dce0ecfd9
parent 237 2dec9f3e7ad5
permissions -rw-r--r--
sys-cluster/nomad: bump to v 1.0.1

#!/sbin/openrc-run
# Copyright 2020 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

export GOMAXPROCS=${GOMAXPROCS:-2}
group=${group:-${RC_SVCNAME}}
user=${user:-${RC_SVCNAME}}
description="simple and flexible workload orchestrator"
command="/usr/bin/${RC_SVCNAME}"
pidfile=${pidfile:-"/run/${RC_SVCNAME}.pid"}
command_background="true"
start_stop_daemon_args="--user ${user} --group ${group} \
       --stdout /var/log/${RC_SVCNAME}/${RC_SVCNAME}.log \
       --stderr /var/log/${RC_SVCNAME}/${RC_SVCNAME}.log"
stopsig=SIGINT
extra_started_commands=reload

depend() {
	after net
}

reload() {
	start-stop-daemon --signal HUP --pidfile "${pidfile}"
}