-
Notifications
You must be signed in to change notification settings - Fork 56
/
rc_d_template
executable file
·31 lines (23 loc) · 986 Bytes
/
rc_d_template
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
#!/bin/sh
# PROVIDE: SERVICE_NAME
# REQUIRE: NETWORKING
# KEYWORD: shutdown
. /etc/rc.subr # required by rc.d subsystem
name="SERVICE_NAME" # name of script
rcvar="SERVICE_NAME_enable" # name of /etc/rc.conf enable command
command="/usr/local/sbin/${name}" # path to executable
command_args="&" # arguments to executable
#pidfile="/var/run/${name}.pid" # file containing service's process ID
required_files="" # files required to start service
#start_cmd="${name}_start" # name of start function
#stop_cmd="${name}_stop" # name of stop function
load_rc_config $name # load rc.conf variables
: ${SERVICE_NAME_enable:=yes} # enable by default
: ${SERVICE_NAME_startmsgs:=yes} # show startup messages in /var/log/syslog
SERVICE_NAME_start() {
# unused
}
SERVICE_NAME_stop() {
# unused
}
run_rc_command "$1" # invoke rc.subr