]> git.pld-linux.org Git - packages/fwlogwatch.git/blame - fwlogwatch.init
- patch for standard pld paths; run as user stats in daemon mode
[packages/fwlogwatch.git] / fwlogwatch.init
CommitLineData
dc0e06de
AM
1#!/bin/sh
2#
3# fwlogwatchd Firewall log analyzer
4#
5# chkconfig: 345 85 15
9dc58e8a 6# description: Firewall log analyzer and raport generator tool
7#
dc0e06de
AM
8# Source function library
9. /etc/rc.d/init.d/functions
10
11# Get service config
12[ -f /etc/sysconfig/fwlogwatch ] && . /etc/sysconfig/fwlogwatch
13
a09c6df7 14RETVAL=0
dc0e06de
AM
15# See how we were called.
16case "$1" in
17 start)
18 # Check if the service is already running?
e5fe27c4 19 if [ ! -f /var/lock/subsys/fwlogwatch ]; then
dc0e06de
AM
20 msg_starting fwlogwatch
21 daemon fwlogwatch $FWLOGWATCH_OPTS
e5fe27c4 22 RETVAL=$?
23 [ $RETVAL -eq 0 ] && touch /var/lock/subsys/fwlogwatch
dc0e06de 24 else
e5fe27c4 25 msg_already_running fwlogwatch
dc0e06de
AM
26 fi
27 ;;
28 stop)
e5fe27c4 29 # Stop daemons.
dc0e06de 30 if [ -f /var/lock/subsys/fwlogwatch ]; then
e5fe27c4 31 msg_stopping fwlogwatch
32 killproc fwlogwatch
33 rm -f /var/lock/subsys/fwlogwatch > /dev/null 2>&1
34 else
35 msg_not_running fwlogwatch
dc0e06de
AM
36 fi
37 ;;
38 status)
39 status fwlogwatch
a09c6df7 40 exit $?
dc0e06de
AM
41 ;;
42 restart)
43 $0 stop
44 $0 start
a09c6df7 45 exit $?
dc0e06de 46 ;;
a09c6df7 47 reload|force-reload)
8e924b49 48 if [ -f /var/lock/subsys/fwlogwatch ]; then
49 msg_reloading fwlogwatch
50 killproc fwlogwatch -HUP
51 RETVAL=$?
52 else
a09c6df7 53 msg_not_running fwlogwatch >&2
54 exit 7
8e924b49 55 fi
dc0e06de
AM
56 ;;
57 *)
a09c6df7 58 msg_usage "$0 {start|stop|restart|reload|force-reload|status}"
59 exit 3
dc0e06de
AM
60esac
61
62exit $RETVAL
This page took 0.077808 seconds and 4 git commands to generate.