[syslog-ng]syslog-ng
Dave Johnson
syslog-ng@lists.balabit.hu
Sat, 8 Jan 2005 15:54:28 -0600
1) remove the first line "init.d script" from the file.
2) change the first "/usr/local/sbin/syslog-ng" to:
"/usr/local/sbin/syslog-ng -f <location to syslog-ng.conf>"
On Fri, 7 Jan 2005 16:26:56 -0500, Michael Di Martino <mdm@telx.com> wrote:
> 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
>
> #
> #description: syslog-ng starup script
> #
> #process name: syslog-ng
> #config: /etc/syslog-ng/syslog-ng.conf
> #pidfile: /var/run/syslog-ng.pid
>
> #source function library
> . /etc/rc.d/init.d/functions
>
> RETVAL=0
>
> case "$1" in
> start)
> echo -n "Starting syslog-ng: "
> if [ ! -f /var/run/syslog-ng.pid ] ; then
> case "`type -type success`" in
> function)
> /usr/local/sbin/syslog-ng && success
> "syslog-ng starup" || \
> failure "syslog-ng startup"
> RETVAL=$?
> ;;
> *)
> /usr/local/sbin/syslog-ng && echo -n
> "syslog-ng "
> RETVAL=$?
> ;;
> esac
> [ $RETVAL -eq 0 ] && echo -n "syslog-ng "
> fi
> echo
> ;;
> stop)
> echo -n "Shutting down syslog-ng; "
> if [ -f /var/run/syslog-ng.pid ] ; then
> killproc syslog-ng
> fi
> echo
> [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/syslog-ng
> ;;
> restart)
> $0 stop
> $0 start
> RETVAL=$?
> ;;
> status)
> status syslog-ng
> RETVAL=$?
> ;;
> *)
> echo "Usage: {start|stop|restart|status}"
> exit 1
> esac
>
> [root@traffic init.d]#
>
> -----Original Message-----
> From: Dave Johnson [mailto:davejjohnson@gmail.com]
> 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=0"
> 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:
> >
> >
> >
> >
> > 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.
> >
> > 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?
> >
> > [root@traffic syslog-ng]# /etc/rc.d/init.d/syslog-ng start
> > /etc/rc.d/init.d/syslog-ng: line 1: init.d: command not found
> > /etc/rc.d/init.d/syslog-ng: line 14: RETVAL-0: command not found
> > Starting syslog-ng: Cannot open configuration file
> > /usr/local/etc/syslog-ng/syslog-ng.conf for reading
> > Parse error reading configuration file, exiting. (line 1)
> > [FAILED]
> > [root@traffic syslog-ng]#
> >
> > this is my startup script
> >
> > [root@traffic syslog-ng]# vi /etc/rc.d/init.d/syslog-ng
> >
> > init.d script
> > #!/bin/bash
> >
> > #
> > #description: syslog-ng starup script
> > #
> > #process name: syslog-ng
> > #config: /etc/syslog-ng/syslog-ng.conf
> > #pidfile: /var/run/syslog-ng.pid
> >
> > #source function library
> > . /etc/rc.d/init.d/functions
> >
> > RETVAL-0
> >
> > case "$1" in
> > start)
> > echo -n "Starting syslog-ng: "
> > if [ ! -f /var/run/syslog-ng.pid ] ; then
> > case "`type -type success`" in
> > function)
> > /usr/local/sbin/syslog-ng && success
> "syslog-ng
> > starup" || \
> > failure "syslog-ng startup"
> > RETVAL=$?
> > ;;
> > *)
> > /usr/local/sbin/syslog-ng && echo -n
> "syslog-ng "
> > RETVAL=$?
> > ;;
> > esac
> > [ $RETVAL -eq 0 ] && echo -n "syslog-ng "
> > fi
> > echo
> > ;;
> > stop)
> > echo -n "Shutting down syslog-ng; "
> > if [ -f /var/run/syslog-ng.pid ] ; then
> > killproc syslog-ng
> > fi
> > echo
> > [ $RETVAL -eq 0 ] && rm -f /var/lock/subsys/syslog-ng
> > ;;
> > restart)
> > $0 stop
> > $0 start
> > RETVAL=$?
> > ;;
> > status)
> > status syslog-ng
> > RETVAL=$?
> > ;;
> > *)
> > echo "Usage: {start|stop|restart|status}"
> > exit 1
> > esac
> >
> > exit $RETVAL
> > Thanks in advance.
> >
> >
> > Regards,
> > Michael DiMartino
> > Director of MIS
> > The telx Group, Inc.
> > 17 State St, 33rd Floor
> > New York, NY 10004
> > T: 212.480.3300 X2022
> > C: 646.207.6603
> >
> >
> >
> >
> > Regards,
> > Michael DiMartino
> > Director of MIS
> > The telx Group, Inc.
> > 17 State St, 33rd Floor
> > New York, NY 10004
> > T: 212.480.3300 X2022
> > C: 646.207.6603
> >
> _______________________________________________
> 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
>
> _______________________________________________
> 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
>
>