summaryrefslogtreecommitdiff
path: root/sysutils/idled/files
diff options
context:
space:
mode:
authorEdwin Groothuis <edwin@FreeBSD.org>2004-01-03 06:59:22 +0000
committerEdwin Groothuis <edwin@FreeBSD.org>2004-01-03 06:59:22 +0000
commit2192ea32a193b2c706c7ec5ff62a87caccc33e65 (patch)
tree37f1c800366cf921a43656585d82c6d6da27920a /sysutils/idled/files
parentNew port mail/postfixadmin (diff)
[PATCH] sysutils/idled 1.16
This patch adds rc_subr support to the idled port. PR: ports/57383 Submitted by: Martin Matuska <martin@tradex.sk> Approved by: maintainer timeout
Notes
Notes: svn path=/head/; revision=97173
Diffstat (limited to 'sysutils/idled/files')
-rw-r--r--sysutils/idled/files/idled.sh50
1 files changed, 32 insertions, 18 deletions
diff --git a/sysutils/idled/files/idled.sh b/sysutils/idled/files/idled.sh
index 35c75289f80a..3021a54fe4ad 100644
--- a/sysutils/idled/files/idled.sh
+++ b/sysutils/idled/files/idled.sh
@@ -1,19 +1,33 @@
#!/bin/sh
-case "$1" in
- stop)
- killall -TERM idled
- echo "idled stopped"
- ;;
- restart)
- killall -TERM idled
- /usr/local/libexec/idled
- echo "idled restarted"
- ;;
- -h)
- echo "Usage: `basename $0` { start | stop | restart }"
- ;;
- *) # includes start
- /usr/local/libexec/idled
- echo -n ' idled'
- ;;
-esac
+#
+# $FreeBSD$
+#
+
+# PROVIDE: idled
+# REQUIRE: DAEMON
+# BEFORE: LOGIN
+# KEYWORD: FreeBSD shutdown
+
+#
+# Add the following lines to /etc/rc.conf to enable idled:
+#
+#idled_enable="YES"
+#
+# See idled(8) for flags
+#
+
+. %%RC_SUBR%%
+
+name=idled
+rcvar=`set_rcvar`
+
+command=%%PREFIX%%/libexec/idled
+required_files=%%PREFIX%%/etc/idled.cf
+
+# set defaults
+
+idled_enable=${idled_enable:-"NO"}
+idled_flags=${idled_flags:-""}
+
+load_rc_config $name
+run_rc_command "$1"