summaryrefslogtreecommitdiff
path: root/archivers/urbackup-server/files/urbackup_server.in
blob: e1643cf609005213efc954dc6927fc51c0a6bc5a (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
27
28
#!/bin/sh

# PROVIDE: urbackup_server
# REQUIRE: LOGIN
# KEYWORD: shutdown
#
# Add these lines to /etc/rc.conf.local or /etc/rc.conf
# to enable this service:
#
# urbackup_server_enable (bool):	Set to NO by default.
#					Set it to YES to enable the UrBackup Server.

. /etc/rc.subr

name=urbackup_server
desc="UrBackup Daemon"
rcvar=urbackup_server_enable

load_rc_config $name

: ${urbackup_server_enable:=NO}

command=%%PREFIX%%/bin/urbackupsrv
pidfile=/var/run/urbackupsrv.pid

command_args="run -d -w $pidfile -c %%PREFIX%%/etc/urbackup/urbackupsrv.conf"

run_rc_command "$1"