summaryrefslogtreecommitdiff
path: root/sysutils/idled/files/idled.sh
diff options
context:
space:
mode:
Diffstat (limited to 'sysutils/idled/files/idled.sh')
-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"