From 7855d86db20ca12fc8b686adacd4b5bad465209f Mon Sep 17 00:00:00 2001 From: Jacob Hrbek Date: Thu, 21 Jan 2021 17:13:30 +0100 Subject: [PATCH] Add service file for openrc Fixes: https://github.com/oxen-io/loki-network/issues/1519 Signed-off-by: Jacob Hrbek --- debian/oxen-node.openrc | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 debian/oxen-node.openrc diff --git a/debian/oxen-node.openrc b/debian/oxen-node.openrc new file mode 100644 index 0000000000..c854e35897 --- /dev/null +++ b/debian/oxen-node.openrc @@ -0,0 +1,31 @@ +#!/bin/sh +# shellcheck shell=sh # Written to comply with IEEE Std 1003.1-2017 +# shellcheck disable=SC2034 # Krey: OpenRC is using variables that are not expected to be set +# Generated by sysd2v v0.3 -- http://www.trek.eu.org/devel/sysd2v +# kFreeBSD do not accept scripts as interpreters, using #!/bin/sh and sourcing. +if [ true != "$INIT_D_SCRIPT_SOURCED" ] ; then + set "$0" "$@"; INIT_D_SCRIPT_SOURCED=true . /lib/init/init-d-script +fi +### BEGIN INIT INFO +# Provides: oxen-node +# Required-Start: $remote_fs +# Required-Stop: $remote_fs +# Should-Start: $network +# Should-Stop: $network +# X-Start-Before: loki-storage +# X-Stop-After: loki-storage +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Description: Oxen network node +### END INIT INFO +set -a +TERM=xterm +set +a + +DESC="oxen-node" +DAEMON="/usr/bin/oxend" +DAEMON_ARGS="--non-interactive --config-file /etc/oxen/oxen.conf" +PIDFILE="/var/run/oxen-node-sysd2v.pid" +START_ARGS="--user _loki --chuid _loki --chdir /var/lib/oxen --background --make-pidfile --notify-await" # --notify-timeout infinity +STOP_ARGS="--user _loki" +