Lines 2-8
Link Here
|
2 |
|
2 |
|
3 |
# $FreeBSD$ |
3 |
# $FreeBSD$ |
4 |
# |
4 |
# |
5 |
# PROVIDE: librespeed-go |
5 |
# PROVIDE: %%PORTNAME%% |
6 |
# REQUIRE: SERVERS |
6 |
# REQUIRE: SERVERS |
7 |
# KEYWORD: shutdown |
7 |
# KEYWORD: shutdown |
8 |
# |
8 |
# |
Lines 10-22
Link Here
|
10 |
# to enable this service: |
10 |
# to enable this service: |
11 |
# |
11 |
# |
12 |
# librespeed_go_enable: Set to NO by default. |
12 |
# librespeed_go_enable: Set to NO by default. |
13 |
# Set it to YES to enable librenms |
13 |
# Set it to YES to enable librespeed-go |
14 |
# librespeed_go_pid: Path of the pid file. |
14 |
# librespeed_go_pid: Path of the pid file. |
15 |
# Default /var/run/librenms/librenms.pid |
15 |
# Default /var/run/%%PORTNAME%%/%%PĀ¹RTNAME%%.pid |
|
|
16 |
# librespeed_go_user: The user account used to run the daemon. |
17 |
# Default: %%LIBRESPEED_USER%% |
18 |
# librespeed_go_group: The group used to run the daemon. |
19 |
# Default: %%LIBRESPEED_GROUP%% |
16 |
# librespeed_go_daemonflags: Flags passed to daemon(8) |
20 |
# librespeed_go_daemonflags: Flags passed to daemon(8) |
17 |
# Default -f which prevents any logging |
21 |
# Default -f which prevents any logging |
18 |
# librespeed_go_chdir: Dir to run the daemon in |
|
|
19 |
# Default /usr/local/libexec/librespeed-go |
20 |
|
22 |
|
21 |
. /etc/rc.subr |
23 |
. /etc/rc.subr |
22 |
|
24 |
|
Lines 27-38
Link Here
|
27 |
load_rc_config $name |
29 |
load_rc_config $name |
28 |
|
30 |
|
29 |
: ${librespeed_go_enable:="NO"} |
31 |
: ${librespeed_go_enable:="NO"} |
30 |
: ${librespeed_go_pid:="/var/run/librespeed-go.pid"} |
32 |
: ${librespeed_go_pid:="/var/run/%%PORTNAME%%/%%PORTNAME%%.pid"} |
|
|
33 |
: ${librespeed_go_user:="%%LIBRESPEED_USER%%"} |
34 |
: ${librespeed_go_group:="%%LIBRESPEED_GROUP%%"} |
31 |
: ${librespeed_go_daemonflags:="-f"} |
35 |
: ${librespeed_go_daemonflags:="-f"} |
32 |
: ${librespeed_go_chdir:="%%PREFIX%%/libexec/librespeed-go"} |
|
|
33 |
|
36 |
|
34 |
pidfile="$librespeed_go_pid" |
37 |
pidfile="$librespeed_go_pid" |
35 |
procname="%%PREFIX%%/libexec/librespeed-go/librespeed-go" |
38 |
procname="%%PREFIX%%/bin/%%PORTNAME%%" |
36 |
command_args="$librespeed_go_daemonflags -p $pidfile $procname" |
39 |
command_args="$librespeed_go_daemonflags -p $pidfile $procname" |
37 |
|
40 |
|
38 |
run_rc_command "$1" |
41 |
run_rc_command "$1" |