diff options
author | Sergey Matveychuk <sem@FreeBSD.org> | 2005-03-04 17:47:19 +0000 |
---|---|---|
committer | Sergey Matveychuk <sem@FreeBSD.org> | 2005-03-04 17:47:19 +0000 |
commit | a42946364e48019305444cc806a513c7f24cb6dd (patch) | |
tree | 2961babd96673fb1b28cebf7be0bbf9567315f8b /sysutils/munin-node/files/munin-node-revive.sh.in | |
parent | - Update to 1.2.0 (diff) |
- Update tp 1.2.0
- Upgrade FreeBSD4 support to rcNG
- Use INSTALL_SCRIPT to install the start-stop script
- Correct rcNG version of pkg-message, adding PREFIX
- Use SUB_FILES and SUB_LIST
- Add log rotation support
PR: ports/77721
Submitted by: maintainer
Notes
Notes:
svn path=/head/; revision=130368
Diffstat (limited to 'sysutils/munin-node/files/munin-node-revive.sh.in')
-rw-r--r-- | sysutils/munin-node/files/munin-node-revive.sh.in | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/sysutils/munin-node/files/munin-node-revive.sh.in b/sysutils/munin-node/files/munin-node-revive.sh.in new file mode 100644 index 000000000000..66bfa746a71d --- /dev/null +++ b/sysutils/munin-node/files/munin-node-revive.sh.in @@ -0,0 +1,27 @@ +#!/bin/sh + +# +# Add the following lines to /etc/rc.conf to enable munin-node: +# munin_node_enable (bool): Set to "NO" by default. +# Set it to "YES" to enable munin-node +# munin_node_config (path): Set to "%%PREFIX%%/etc/munin/munin-node.conf" by default. +# + +. %%RC_SUBR%% + +name="munin_node" +rcvar=`set_rcvar` + +[ -z "$munin_node_enable" ] && munin_node_enable="NO" +[ -z "$munin_node_config" ] && munin_node_config="%%PREFIX%%/etc/munin/munin-node.conf" + +command="%%PREFIX%%/sbin/munin-node" +pidfile=`awk '$1 == "pid_file" { print $2 }' $munin_node_config` + +load_rc_config $name + +#set -x +pid=`check_pidfile $pidfile %%PREFIX%%/sbin/munin-node` +if [ -z "$pid" ]; then + run_rc_command start > /dev/null +fi |