#!/sbin/openrc-run name=vault daemon=/usr/sbin/$name daemon_user=$name daemon_group=$name pidfile="/run/${name}.pid" depend() { need net after firewall } start() { checkpath -f -m 0644 -o "${daemon_user}":"${daemon_group}" "$pidfile" ebegin "Starting ${name}" start-stop-daemon --start --quiet \ -m --pidfile "$pidfile" \ --user ${daemon_user} --group ${daemon_group} \ -b -1 /dev/null -2 /dev/null \ -k 027 --exec ${daemon} -- ${vault_opts} eend $? } stop() { ebegin "Stopping ${name}" start-stop-daemon --stop --quiet \ --pidfile "$pidfile" \ --exec ${daemon} eend $? }