aboutsummaryrefslogtreecommitdiffstats
path: root/main/backuppc/backuppc.initd
blob: 751f04bf4e0d9f2ef6e2ed094cb1add00dc6175a (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
25
26
#!/sbin/openrc-run

extra_started_commands="reload"

: ${user:="backuppc"}
: ${logdir:="/var/log/BackupPC"}
: ${command_args:="-d"}

command="/usr/share/BackupPC/bin/BackupPC"
start_stop_daemon_args="--interpreted --user $user"
pidfile="/run/BackupPC/BackupPC.pid"
retry="30"

depend() {
	after firewall modules
}

start_pre() {
	checkpath -d -o $user -m 755 "${pidfile%/*}"
}

reload() {
	ebegin "Reloading $name"
	start-stop-daemon --signal 1 --pidfile "$pidfile" -x /usr/bin/perl
	eend $?
}