Files
guru/net-im/tuwunel/files/tuwunel.init-r1
T
zyxhere💭 60a6125478 net-im/tuwunel: remove $pidfile, use $command_args in OpenRC service
supervise-daemon doesn't use $pidfile (unless using chroot)
Funcionally the updated file should be same.

Signed-off-by: zyxhere💭 <zyx@envs.net>
2026-09-30 12:24:56 +00:00

33 lines
919 B
Plaintext

#!/sbin/openrc-run
# Copyright 2023-2026 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
#
# shellcheck shell=sh
export NO_COLOR=1
export TUWUNEL_CONFIG=${CONDUIT_CONFIG:-/etc/tuwunel/tuwunel.toml}
export TUWUNEL_PID_FILE=${TUWUNEL_PID_FILE:-/run/${RC_SVCNAME}.pid}
export TUWUNEL_LOG_DIR=${TUWUNEL_LOG_DIR:-/var/log/tuwunel}
export TUWUNEL_USER=${TUWUNEL_USER:-tuwunel}
export TUWUNEL_GROUP=${TUWUNEL_GROUP:-tuwunel}
description="Tuwunel [matrix] homeserver"
supervisor="supervise-daemon"
command="/usr/bin/tuwunel"
command_args="-c ${TUWUNEL_CONFIG}"
command_user="${TUWUNEL_USER}:${TUWUNEL_GROUP}"
output_log="${TUWUNEL_LOG_DIR}/tuwunel.log"
error_log="${TUWUNEL_LOG_DIR}/tuwunel.err"
required_files="${TUWUNEL_CONFIG}"
depend() {
need net
}
start_pre() {
checkpath -f -m 0640 -o "${command_user}" "${output_log}"
checkpath -f -m 0640 -o "${command_user}" "${error_log}"
}