mirror of
https://github.com/gentoo-mirror/guru.git
synced 2026-10-12 17:51:11 -04:00
supervise-daemon doesn't use $pidfile (unless using chroot) Funcionally the updated file should be same. Signed-off-by: zyxhere💭 <zyx@envs.net>
33 lines
919 B
Plaintext
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}"
|
|
}
|