[syslog-ng]syslog-ng

Michael Di Martino syslog-ng@lists.balabit.hu
Fri, 7 Jan 2005 16:26:56 -0500


Dave thanks for the response
However, I am not sure where to put the path to my syslog-ng.conf file.

Below is a copy of my startup script.

[root@traffic init.d]# cat syslog-ng
init.d script
#!/bin/bash=20
=20
#
#description: syslog-ng starup script=20
#=20
#process name: syslog-ng=20
#config: /etc/syslog-ng/syslog-ng.conf=20
#pidfile: /var/run/syslog-ng.pid=20
=20
#source function library
. /etc/rc.d/init.d/functions=20
=20
RETVAL=3D0

 case "$1" in=20
         start)=20
                 echo -n "Starting syslog-ng: "=20
                 if [ ! -f /var/run/syslog-ng.pid ] ; then=20
                         case "`type -type success`" in=20
                           function)=20
                           /usr/local/sbin/syslog-ng && success
"syslog-ng starup" || \
                                failure "syslog-ng startup"=20
                            RETVAL=3D$?=20
                          ;;=20
                          *)=20
                           /usr/local/sbin/syslog-ng && echo -n
"syslog-ng "
                            RETVAL=3D$?=20
                          ;;=20
                          esac=20
                          [ $RETVAL -eq 0 ] && echo -n "syslog-ng "=20
                 fi=20
                 echo=20
                 ;;=20
         stop)=20
                 echo -n "Shutting down syslog-ng; "=20
                 if [ -f /var/run/syslog-ng.pid ] ; then=20
                         killproc syslog-ng=20
                 fi=20
                 echo=20
                 [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/syslog-ng=20
                 ;;=20
         restart)=20
                 $0 stop=20
                 $0 start=20
                 RETVAL=3D$?=20
                 ;;=20
         status)=20
                 status syslog-ng=20
                 RETVAL=3D$?=20
                 ;;=20
         *)=20
                 echo "Usage: {start|stop|restart|status}"=20
                 exit 1
 esac=20
=20
[root@traffic init.d]#

-----Original Message-----
From: Dave Johnson [mailto:davejjohnson@gmail.com]=20
Sent: Friday, January 07, 2005 3:21 PM
To: syslog-ng@lists.balabit.hu
Subject: Re: [syslog-ng]syslog-ng

1) Does "init.d script" come before #!/bin/bash?
2) before the first case statement modify "RETVAL-0"  to be "RETVAL=3D0"
3) in the lines that have "/usr/local/sbin/syslog-ng"  add the "-f"
option and give
    the config file location on your system; because by default its
trying to find it
    "/usr/local/etc/syslog-ng/syslog-ng.conf"  and its not there.

On Fri, 7 Jan 2005 13:53:07 -0500, Michael Di Martino <mdm@telx.com>
wrote:
> =20
> =20
> =20
>=20
> I have just installed syslog-ng-1.6.5 and was looking forwarded to
putting
> some of its features to good use. However, I just cannot get this up
> according to your install instructions.=20
>=20
> When I try to start "syslog-ng" I get the following errors. I have
check the
> startup for typos I could not find any. does anyone have any insight
to this
> error?=20
>=20
> [root@traffic syslog-ng]# /etc/rc.d/init.d/syslog-ng start=20
> /etc/rc.d/init.d/syslog-ng: line 1: init.d: command not found=20
> /etc/rc.d/init.d/syslog-ng: line 14: RETVAL-0: command not found=20
> Starting syslog-ng: Cannot open configuration file
> /usr/local/etc/syslog-ng/syslog-ng.conf for reading=20
> Parse error reading configuration file, exiting. (line 1)=20
> [FAILED]=20
> [root@traffic syslog-ng]#=20
>=20
> this is my startup script=20
>=20
> [root@traffic syslog-ng]# vi /etc/rc.d/init.d/syslog-ng=20
>=20
> init.d script=20
> #!/bin/bash=20
>=20
> #=20
> #description: syslog-ng starup script=20
> #=20
> #process name: syslog-ng=20
> #config: /etc/syslog-ng/syslog-ng.conf=20
> #pidfile: /var/run/syslog-ng.pid=20
>=20
> #source function library=20
> . /etc/rc.d/init.d/functions=20
>=20
> RETVAL-0=20
>=20
> case "$1" in=20
>         start)=20
>                 echo -n "Starting syslog-ng: "=20
>                 if [ ! -f /var/run/syslog-ng.pid ] ; then=20
>                         case "`type -type success`" in=20
>                           function)=20
>                             /usr/local/sbin/syslog-ng && success
"syslog-ng
> starup" || \=20
>                                failure "syslog-ng startup"=20
>                            RETVAL=3D$?=20
>                          ;;=20
>                          *)=20
>                            /usr/local/sbin/syslog-ng && echo -n
"syslog-ng "
>                            RETVAL=3D$?=20
>                          ;;=20
>                          esac=20
>                          [ $RETVAL -eq 0 ] && echo -n "syslog-ng "=20
>                 fi=20
>                 echo=20
>                 ;;=20
>         stop)=20
>                 echo -n "Shutting down syslog-ng; "=20
>                 if [ -f /var/run/syslog-ng.pid ] ; then=20
>                         killproc syslog-ng=20
>                 fi=20
>                 echo=20
>                 [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/syslog-ng=20
>                 ;;=20
>         restart)=20
>                 $0 stop=20
>                 $0 start=20
>                 RETVAL=3D$?=20
>                 ;;=20
>         status)=20
>                 status syslog-ng=20
>                 RETVAL=3D$?=20
>                 ;;=20
>         *)=20
>                 echo "Usage: {start|stop|restart|status}"=20
>                 exit 1=20
> esac=20
>=20
> exit $RETVAL=20
> Thanks in advance.=20
> =20
>=20
> Regards,=20
> Michael DiMartino=20
> Director of MIS=20
> The telx Group, Inc.=20
> 17 State St, 33rd Floor=20
> New York, NY 10004=20
> T: 212.480.3300 X2022=20
> C: 646.207.6603=20
>  =20
> =20
> =20
>=20
> Regards,=20
> Michael DiMartino=20
> Director of MIS=20
> The telx Group, Inc.=20
> 17 State St, 33rd Floor=20
> New York, NY 10004=20
> T: 212.480.3300 X2022=20
> C: 646.207.6603=20
>
_______________________________________________
syslog-ng maillist  -  syslog-ng@lists.balabit.hu
https://lists.balabit.hu/mailman/listinfo/syslog-ng
Frequently asked questions at http://www.campin.net/syslog-ng/faq.html