diff options
Diffstat (limited to 'sys-process/below/files/below.initd')
-rw-r--r-- | sys-process/below/files/below.initd | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/sys-process/below/files/below.initd b/sys-process/below/files/below.initd new file mode 100644 index 000000000000..8c1b8eb56cff --- /dev/null +++ b/sys-process/below/files/below.initd @@ -0,0 +1,30 @@ +#!/sbin/openrc-run +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +pidfile=/run/${RC_SVCNAME}.pid +LOGPATH=/var/log/${RC_SVCNAME} +DATADIR=/var/lib/${RC_SVCNAME} +command_user=root +command=/usr/bin/below +command_args="record ${BELOW_EXTRA_ARGS}" +command_background=true +start_stop_daemon_args=" + --chdir ${DATADIR} + -1 ${LOGPATH}/${RC_SVCNAME}.log + -2 ${LOGPATH}/${RC_SVCNAME}.err" + +depend() { + need localmount + after bootmisc +} + +start() { + if [ ! -d "${LOGPATH}" ] ; then + mkdir -p "${LOGPATH}" + fi + if [ ! -d "${DATADIR}" ] ; then + mkdir -p "${DATADIR}" + fi + default_start +} |