# HG changeset patch # User carl # Date 1189361345 25200 # Node ID 3eb867c9beb2e409dc51e398e1a36af3e8439bd2 # Parent 601bc0e075e1dabf65170c2130f62e0eb58b3854 gpl3 diff -r 601bc0e075e1 -r 3eb867c9beb2 Makefile.am --- a/Makefile.am Sun Sep 09 10:59:15 2007 -0700 +++ b/Makefile.am Sun Sep 09 11:09:05 2007 -0700 @@ -3,12 +3,10 @@ hack_SCRIPTS = syslog2iptables sysconf_DATA = syslog2iptables.conf CLEANFILES = syslog2iptables xml/syslog2iptables xml/Makefile -EXTRA_DIST = syslog2iptables.rc syslog2iptables.conf syslog2iptables.spec $(wildcard xml/h*) $(wildcard xml/M*) $(wildcard xml/s*) +EXTRA_DIST = syslog2iptables.conf syslog2iptables.spec $(wildcard xml/h*) $(wildcard xml/M*) $(wildcard xml/s*) -syslog2iptables: $(srcdir)/syslog2iptables.rc - rm -f syslog2iptables - echo "#!" $(BASH) >syslog2iptables - cat $(srcdir)/syslog2iptables.rc | \ +syslog2iptables: syslog2iptables.rc + cat syslog2iptables.rc | \ sed -e "s,SBINDIR,$(sbindir),g" | \ sed -e "s,SYSCONFDIR,$(sysconfdir),g" >>syslog2iptables diff -r 601bc0e075e1 -r 3eb867c9beb2 configure.in --- a/configure.in Sun Sep 09 10:59:15 2007 -0700 +++ b/configure.in Sun Sep 09 11:09:05 2007 -0700 @@ -35,6 +35,7 @@ AC_CHECK_FUNCS([gethostbyname inet_ntoa memchr memmove memset regcomp strdup strtol]) AC_CONFIG_FILES([Makefile + syslog2iptables.rc syslog2iptables.spec html/Makefile info/Makefile diff -r 601bc0e075e1 -r 3eb867c9beb2 syslog2iptables.rc --- a/syslog2iptables.rc Sun Sep 09 10:59:15 2007 -0700 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,71 +0,0 @@ -# -- bash header installed by automake -- -# -# syslog2iptables This script controls the syslog2iptables daemon. -# -# -# chkconfig: 2345 60 40 -# description: syslog2iptables monitors syslog files, parses them, and update the iptables filters -# processname: syslog2iptables -# pidfile: /var/run/syslog2iptables.pid -# Source function library. -# -. /etc/rc.d/init.d/functions - -# Source networking configuration. -. /etc/sysconfig/network - -RETVAL=0 -# See how we were called. -case "$1" in - start) - # Start daemons. - echo -n "Starting syslog2iptables: " - if [ ! -f /var/lock/subsys/syslog2iptables ]; then - cd SYSCONFDIR # conf file is here - SBINDIR/syslog2iptables -d 3 - RETVAL=$? - pid=`pidof -s SBINDIR/syslog2iptables` - if [ $pid ] - then - success "Starting syslog2iptables :" - touch /var/lock/subsys/syslog2iptables - echo - else - failure "Starting syslog2iptables:" - echo - fi - else - echo -n "already running! " - failure "syslog2iptables already running!" - echo - fi - - ;; - stop) - # Stop daemons. - echo -n "Shutting down syslog2iptables: " - killproc syslog2iptables - RETVAL=$? - echo - [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/syslog2iptables - ;; - restart|reload) - $0 stop - $0 flush - $0 start - RETVAL=$? - ;; - flush) - /sbin/iptables -F INPUT - ;; - status) - status syslog2iptables - RETVAL=$? - ;; - *) - echo "Usage: syslog2iptables {start|stop|restart|status|flush}" - exit 1 -esac -exit $RETVAL - -# $Id$ diff -r 601bc0e075e1 -r 3eb867c9beb2 syslog2iptables.rc.in --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/syslog2iptables.rc.in Sun Sep 09 11:09:05 2007 -0700 @@ -0,0 +1,71 @@ +# -- bash header installed by automake -- +# +# syslog2iptables This script controls the syslog2iptables daemon. +# +# +# chkconfig: 2345 60 40 +# description: syslog2iptables monitors syslog files, parses them, and update the iptables filters +# processname: syslog2iptables +# pidfile: /var/run/syslog2iptables.pid +# Source function library. +# +. /etc/rc.d/init.d/functions + +# Source networking configuration. +. /etc/sysconfig/network + +RETVAL=0 +# See how we were called. +case "$1" in + start) + # Start daemons. + echo -n "Starting syslog2iptables: " + if [ ! -f /var/lock/subsys/syslog2iptables ]; then + cd SYSCONFDIR # conf file is here + SBINDIR/syslog2iptables -d 3 + RETVAL=$? + pid=`pidof -s SBINDIR/syslog2iptables` + if [ $pid ] + then + success "Starting syslog2iptables :" + touch /var/lock/subsys/syslog2iptables + echo + else + failure "Starting syslog2iptables:" + echo + fi + else + echo -n "already running! " + failure "syslog2iptables already running!" + echo + fi + + ;; + stop) + # Stop daemons. + echo -n "Shutting down syslog2iptables: " + killproc syslog2iptables + RETVAL=$? + echo + [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/syslog2iptables + ;; + restart|reload) + $0 stop + $0 flush + $0 start + RETVAL=$? + ;; + flush) + /sbin/iptables -F INPUT + ;; + status) + status syslog2iptables + RETVAL=$? + ;; + *) + echo "Usage: syslog2iptables {start|stop|restart|status|flush}" + exit 1 +esac +exit $RETVAL + +# $Id$