[syslog-ng] Redhat init script?

David Robinson drobinso@nrg.com.au
Thu, 21 Oct 1999 19:39:55 +1000


Thanks, It worked perfectly.

Can this script be added to a contrib dir in the syslog-ng.tar.gz archive?

Regards,
David Robinson

georg.funke@netcologne.de wrote:

> On 21 Oct, David Robinson wrote:
> > Has anyone made up a standard syslog-ng start/stop init script for Redhat 6?
> >
> > I noticed there was a debian one..
> >
> > I'm currently just starting syslog-ng from the rc.local script.
> >
> > If not I'll create one but I don't want to do it if someone has already done it.
> >
>
> Hi,
>
> here is one. It works with Redhat 6.0/6.1
>
>         Georg
>
> --
> Georg Funke
> Crowns & Flames SDC Cologne, Germany; http://www.geocities.com/Colosseum/4893
> "Friendship is Square Dancing's greatest Reward"
>
>                                                   -----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
> #!/bin/sh
> #
> # syslog        Starts syslog-ng
> #
> # chkconfig: 345 11 70
> # description: syslog-ng is a enhanced system and kernel logging daemon
> # Author:       Georg Funke, <georg.funke@netcologne.de>
>
> # Source function library.
> . /etc/rc.d/init.d/functions
>
> [ -f /usr/sbin/syslog-ng ] || exit 0
>
> # See how we were called.
> case "$1" in
>   start)
>         echo -n "Starting system loggers: "
>         daemon syslog-ng -f /etc/syslog-ng/syslog-ng.conf
>         echo
>         touch /var/lock/subsys/syslog-ng
>         ;;
>   stop)
>         echo -n "Shutting down system loggers: "
>         killproc syslog-ng
>         echo
>         rm -f /var/lock/subsys/syslog-ng
>         ;;
>   restart)
>         $0 stop
>         $0 start
>         ;;
>   reload)
>         echo -n "Reloading syslog-ng: "
>         killproc syslog-ng -HUP
>         echo
>         ;;
>   *)
>         echo "Usage: syslog {start|stop|restart|reload}"
>         exit 1
> esac
>
> exit 0