summaryrefslogtreecommitdiff
path: root/net-misc/fileshelter/files/fileshelter.init
blob: d1808d4b4de4d1e8a45390bfd9d35370847ddf67 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#!/sbin/openrc-run
# Copyright 2024 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2

: ${FILESHELTER_GROUP:=fileshelter}
: ${FILESHELTER_USER:=fileshelter}
: ${FILESHELTER_BINDIR:=/var/lib/fileshelter}

command="/usr/bin/fileshelter"
command_user="${FILESHELTER_USER}:${FILESHELTER_GROUP}"
command_background=true
directory="${FILESHELTER_BINDIR}"
pidfile="/run/${RC_SVCNAME}.pid"
extra_started_commands="reload"

depend() {
	use net
}

reload () {
	ebegin "Reloading configuration and re-opening log files"
	start-stop-daemon --signal HUP --pidfile "${pidfile}"
	eend $?
}