summaryrefslogtreecommitdiff
path: root/net/hobbitmon
diff options
context:
space:
mode:
authormanu <manu>2006-05-20 20:23:38 +0000
committermanu <manu>2006-05-20 20:23:38 +0000
commit68a0845c2416ce594d365be7e85aa936bd12bf5a (patch)
tree4935b89ec981c9f2efb7e66d1f75f7d1774ca8e4 /net/hobbitmon
parentfbbaa778d90431e4ceab1bf06c4302e066cd522d (diff)
downloadpkgsrc-68a0845c2416ce594d365be7e85aa936bd12bf5a.tar.gz
Startup script from Nathan Arthur
Diffstat (limited to 'net/hobbitmon')
-rw-r--r--net/hobbitmon/files/hobbit.sh29
1 files changed, 29 insertions, 0 deletions
diff --git a/net/hobbitmon/files/hobbit.sh b/net/hobbitmon/files/hobbit.sh
new file mode 100644
index 00000000000..694895a49f9
--- /dev/null
+++ b/net/hobbitmon/files/hobbit.sh
@@ -0,0 +1,29 @@
+#!/bin/sh
+#
+# Hobbit site monitoring server
+# Startup script contributed by Nathan Arthur
+#
+# PROVIDE: hobbit
+# REQUIRE: DAEMON
+
+name="hobbit"
+
+# user-settable rc.conf variables
+: ${hobbit_launchcfg:="/usr/pkg/hobbit/server/etc/hobbitlaunch.cfg"}
+: ${hobbit_servercfg:="/usr/pkg/hobbit/server/etc/hobbitserver.cfg"}
+: ${hobbit_log:="/var/log/hobbit/hobbitlaunch.log"}
+: ${hobbit_pidfile:="/var/run/${name}.pid"}
+
+if [ -f /etc/rc.subr ]; then
+ . /etc/rc.subr
+fi
+
+rcvar=${name}
+hobbit_user="hobbit"
+pidfile=${hobbit_pidfile}
+required_files="${hobbit_launchcfg} ${hobbit_servercfg}"
+command="/usr/pkg/hobbit/server/bin/hobbitlaunch"
+command_args="--config=${hobbit_launchcfg} --env=${hobbit_servercfg} --log=${hobbit_log} --pidfile=${hobbit_pidfile}"
+
+load_rc_config $name
+run_rc_command "$1"