Added
Link Here
|
1 |
#!/bin/sh |
2 |
# |
3 |
# $FreeBSD$ |
4 |
# |
5 |
# PROVIDE: watchd |
6 |
# REQUIRE: DAEMON |
7 |
# KEYWORD: shutdown |
8 |
# |
9 |
# Add the following line to /etc/rc.conf[.local] to enable watchd |
10 |
# |
11 |
# watchd_enable (bool): Set to "NO" by default. |
12 |
# Set it to "YES" to enable watchd. |
13 |
|
14 |
. %%RC_SUBR%% |
15 |
|
16 |
name="watchd" |
17 |
rcvar=${name}_enable |
18 |
|
19 |
load_rc_config $name |
20 |
|
21 |
: ${watchd_enable="NO"} |
22 |
: ${watchd_config="%%PREFIX%%/etc/watchd.conf"} |
23 |
: ${watchd_log="/var/log/watchd.log"} |
24 |
|
25 |
command="%%PREFIX%%/bin/watchd" |
26 |
command_args="${watchd_config} >> ${watchd_log}" |
27 |
required_files="${watchd_config}" |
28 |
|
29 |
run_rc_command "$1" |