summaryrefslogtreecommitdiff
path: root/multimedia/neolink/files/neolink.in
blob: 8b960e94d36624dab1a1e7f5cb2b807d4d09b5cb (plain) (blame)
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
29
30
31
32
33
34
35
36
37
38
#!/bin/sh
#
# PROVIDE: neolink
# REQUIRE: LOGIN
# KEYWORD: shutdown

# Add the following lines to /etc/rc.conf to enable neolink:
#
# neolink_enable="YES"
#
# Optionally, the following default values are set and may be adjusted:
#
# neolink_config="%%ETCDIR%%/config.toml"
# neolink_user="neolink"

. /etc/rc.subr

name="neolink"
rcvar=neolink_enable

load_rc_config $name

: ${neolink_enable="NO"}
: ${neolink_config:=%%ETCDIR%%/config.toml}
: ${neolink_user="neolink"}

pidfile=/var/run/neolink.pid
command="%%PREFIX%%/bin/neolink"

start_cmd="${name}_start"

neolink_start()
{
	echo -n "Starting ${name}."
	/usr/sbin/daemon -fp ${pidfile} -u ${neolink_user} ${command} rtsp -c ${neolink_config}
}

run_rc_command "$1"