ng # # DO NOT CHANGE THESE LINES (unless you know  what  you  are
doing)  #  chkconfig:  2345 12 88 # description: syslog-ng is the
next generation of the syslog daemon. # syslog-ng gives  you  the
flexibility  of  logging not only by facility and # severity, but
also by host, message content, date, etc. it can also  replace  #
klogd's  function  of  logging kernel messages # # This following
block of lines is correct, do not change! (for more info,  see  #
http://www.linuxbase.org/spec/refspecs/LSB_1.1.0/gLSB/facil-
name.html) ### BEGIN INIT INFO # Provides: $syslog ###  END  INIT
INFO
################################################################################
#  #  This is an init script for syslog-ng on the Linux platform.
# #  It totally relies on the Redhat function library  and  works
the  same  #   way  as  other typical Redhat init scripts.  # # #
Platforms (tested): Linux (Redhat  7.3)  #  #  #  Author:  Gregor
Binder <gbinder@sysfive.com> # Changed: October 10, 2000 # # Last
Changed: September  27,  2002  #  Updated  by:  Diane  Davidowicz
#       changes:  Brought  the start script up to snuff as far as
compliance #                 with  managing  the  startup  script
through  chkconfig;  #                added PATH variable ability
to hook in path to syslog-ng (if #                its necessary);
converted  init  script  format  to the #                standard
init script format in Red Hat (7.3 to be exact)  #
including    using    the    /etc/sysconfig/syslog-ng   file   to
#                 managed  the  arguments  to  syslog-ng  without
changing  this  #                 script,  and disabled klogd but
noted where and under what #                conditions it  should
be  enabled.  HAPPY  LOGGING.  # #     Copyright (c) 2000 by sys-
five.com     GmbH,     All     rights     reserved.      #      #
################################################################################
# # configuration #

INIT_PROG=syslog-ng

# # Source Redhat function library.  #

# Tack  on  path  to  syslog-ng  if  not  already  in  PATH  SYS-
LOGNG_PATH=":/usr/local/sbin"

PATH=$PATH$SYSLOGNG_PATH export PATH

#  /etc/sysconfig/  is  the standard way to pull in options for a
daemon to use.  # Source config if [ -f  /etc/sysconfig/syslog-ng
]  ;  then          .  /etc/sysconfig/syslog-ng else         SYS-
LOGNG_OPTIONS= fi

RETVAL=0

umask 077 ulimit -c 0

# See how we were called.  start() {          echo  -n  "Starting
$INIT_PROG:   "           daemon   $INIT_PROG   $SYSLOGNG_OPTIONS
sys/${INIT_PROG}"         return $RETVAL }

stop() {         # Same here concerning klogd. Uncomment the fol-
lowing block of         # code if you are needing to run it

        #echo -n $"Shutting down kernel logger: "
        #killproc klogd
        #echo

        echo   -n   "Stopping   $INIT_PROG:   "          killproc
$INIT_PROG         RETVAL=$?          echo

        [  $RETVAL   -eq   0   ]   &&   rm   -f   "/var/lock/sub-
sys/${INIT_PROG}"         return $RETVAL

}

rhstatus() {         status $INIT_PROG }

restart() {         stop         start }

case "$1" in
  start)         start         ;;
  stop)         stop         ;;
  status)         rhstatus         ;;
  restart|reload)         restart         ;;
  condrestart)           [  -f  /var/lock/subsys/syslog-ng  ]  &&
restart || :         ;;
  *)         echo $"Usage: $0 {start|stop|status|restart|reload}"
        exit 1 esac

exit $?





















Man(1) output converted with man2html