summaryrefslogtreecommitdiff
path: root/java/avis/files/avisd.sh
diff options
context:
space:
mode:
Diffstat (limited to 'java/avis/files/avisd.sh')
-rw-r--r--java/avis/files/avisd.sh34
1 files changed, 34 insertions, 0 deletions
diff --git a/java/avis/files/avisd.sh b/java/avis/files/avisd.sh
new file mode 100644
index 000000000000..8c8c51917e4d
--- /dev/null
+++ b/java/avis/files/avisd.sh
@@ -0,0 +1,34 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: avisd
+# REQUIRE: LOGIN
+# KEYWORD: shutdown
+
+# Add the following line to /etc/rc.conf to enable `avisd':
+#
+#avisd_enable="YES"
+#
+# See avisd(1) for avisd_flags
+#
+
+. "/etc/rc.subr"
+
+name="avisd"
+rcvar=`set_rcvar`
+
+logfile="/var/log/avis.log"
+command="/usr/local/sbin/avisd"
+pidfile="/var/run/$name.pid"
+command_args="-c /usr/local/etc/$name.conf -daemon -pidfile $pidfile -logfile $logfile"
+command_interpreter=/bin/sh
+required_files="/usr/local/etc/$name.conf"
+
+# read configuration and set defaults
+load_rc_config "$name"
+: ${avisd_enable="NO"}
+: ${avisd_flags=""}
+
+run_rc_command "$1"