summarylogtreecommitdiffstats
path: root/fwlogwatch
diff options
context:
space:
mode:
authorPhillip Smith2015-06-09 09:53:25 +1000
committerPhillip Smith2015-06-09 09:53:25 +1000
commit4f23cccae035d1f8ad40d842742f261c44c72269 (patch)
treebab34891988237935d0dd736c9218b5bee44ac20 /fwlogwatch
downloadaur-4f23cccae035d1f8ad40d842742f261c44c72269.tar.gz
initial commit
Diffstat (limited to 'fwlogwatch')
-rw-r--r--fwlogwatch38
1 files changed, 38 insertions, 0 deletions
diff --git a/fwlogwatch b/fwlogwatch
new file mode 100644
index 000000000000..0afbecffe358
--- /dev/null
+++ b/fwlogwatch
@@ -0,0 +1,38 @@
+#!/bin/bash
+
+# source application-specific settings
+[ -f /etc/conf.d/fwlogwatch ] && . /etc/conf.d/fwlogwatch
+
+. /etc/rc.conf
+. /etc/rc.d/functions
+
+PID=`pidof -o %PPID /usr/sbin/fwlogwatch`
+case "$1" in
+ start)
+ stat_busy "Starting fwlogwatch"
+ [ -z "$PID" ] && /usr/sbin/fwlogwatch ${ARGS}
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ add_daemon fwlogwatch
+ stat_done
+ fi
+ ;;
+ stop)
+ stat_busy "Stopping fwlogwatch"
+ [ ! -z "$PID" ] && kill $PID &> /dev/null
+ if [ $? -gt 0 ]; then
+ stat_fail
+ else
+ rm_daemon fwlogwatch
+ stat_done
+ fi
+ ;;
+ restart)
+ $0 stop
+ $0 start
+ ;;
+ *)
+ echo "usage: `basename $0` {start|stop|restart}"
+esac
+exit 0