Files
guru/net-misc/gmcapsule/files/gmcapsuled.initd
Anna (cybertailor) Vyalkova 96020a54a1 net-misc/gmcapsule: new package, add 0.6.1
Signed-off-by: Anna (cybertailor) Vyalkova <cyber+gentoo@sysrq.in>
2024-02-16 06:28:53 +05:00

30 lines
697 B
Plaintext

#!/sbin/openrc-run
# Copyright 2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
# shellcheck shell=sh
extra_started_commands="reload"
command="/usr/bin/gmcapsuled"
command_args="-c ${GMCAPSULED_CONFIG:=/etc/gmcapsule/config.ini}"
command_user="gemini:gemini"
command_background=1
pidfile="/run/gmcapsuled.pid"
output_logger="logger -p daemon.info -t gmcapsuled --"
error_logger="logger -p daemon.err -t gmcapsuled --"
depend() {
use logger
need net
}
start_pre() {
export PYTHONUNBUFFERED=1
}
reload() {
ebegin "Refreshing gmcapsuled's configuration"
start-stop-daemon --signal SIGHUP --pidfile "${pidfile}"
eend $? "Failed to reload gmcapsuled"
}