summaryrefslogtreecommitdiff
path: root/audio/jamulus/files/jamulus-server.in
blob: 9ff0da5f678dc2bc1cdda70d676cda96200d0d0c (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: jamulus-server
# REQUIRE: DAEMON NETWORKING
# KEYWORD: shutdown

# Add the following lines to /etc/rc.conf to enable jamulus_server:
# jamulus_server_enable : set to "YES" to enable the daemon, default is "NO"
# jamulus_server_flags  : any extra flags, default is ""
#    - list of all possible flags: https://jamulus.io/wiki/Command-Line-Options

. /etc/rc.subr

name=jamulus_server
rcvar=jamulus_server_enable

load_rc_config $name

jamulus_server_enable=${jamulus_server_enable:-"NO"}
jamulus_server_flags=${jamulus_server_flags:-""}

logfile="/var/log/${name}.log"

procname=%%PREFIX%%/bin/jamulus-server
command="/usr/sbin/daemon"
command_args="-u %%USER%% -o ${logfile} -t ${name} %%PREFIX%%/bin/jamulus-server -s ${jamulus_server_flags}"

run_rc_command "$1"