I didn’t come across anything like this while scouring
the archives, but maybe someone has some ideas.
So I just installed 1.5.26 onto a fresh RH8 install and I’m
trying to use my previous init.d script (see below)
that I got from an “old school” post from Binder. I’m not a rocket scientist when it
comes to linux, but according to the man pages the
latest NG is still looking for the config file in /etc/syslog-ng/syslog-ng.conf. I’m getting the following error
message when I try to run my init.d file.
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)
I don’t see anything in the script that looks like it
should point it to the usr/local dir…….
So what am I missing?
Or is there just a newer copy of an init script that I can mooch?
JM
:
################################################################################
#
#
Program: syslog-ng init script
#
#
Description:
#
# 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 6.1)
#
#
#
Author: Gregor Binder <gbinder@sysfive.com>
#
#
Last Changed:
#
# Copyright (c) 2000 by
sysfive.com GmbH, All rights reserved.
# Modded as needed for aesthetic porpoises
-JM
################################################################################
################################################################################
#
configuration
#
INIT_PROG="/usr/local/sbin/syslog-ng" # Full path to daemon
INIT_OPTS="-v
-p /var/log/syslog-ng.pid"
# options passed to daemon
PATH=/bin:/sbin:/usr/bin:/usr/local/sbin:/usr/sbin
INIT_NAME=`basename "$INIT_PROG"`
# Source Redhat function
library.
#
.
/etc/rc.d/init.d/functions
#
Source config
if [
-f /etc/sysconfig/syslog ] ; then
. /etc/sysconfig/syslog
else
KLOGD_OPTIONS="-2"
fi
#
Uncomment this if you are on Redhat and think this is
useful
#
#.
/etc/sysconfig/network
#
#if
[ ${NETWORKING} = "no" ]
#then
# exit
0
#fi
RETVAL=0
umask
077
ulimit
-c 0
#
See how we were called.
case
"$1" in
start)
echo -n "Starting $INIT_NAME: "
daemon --check $INIT_PROG "$INIT_PROG $INIT_OPTS"
RETVAL=$?
echo -n "Starting Kernel Logger and Syslog-ng
v.1.4.12: "
[ -x "/sbin/klogd" ]
&& daemon klogd $KLOGD_OPTIONS
echo
[ $RETVAL -eq 0 ] && touch
"/var/lock/subsys/${INIT_NAME}"
;;
stop)
echo -n "Stopping $INIT_NAME: "
killproc $INIT_PROG
RETVAL=$?
echo -n "Stopping Kernel Logger and Syslog-ng
v.1.4.12: "
[ -x "/sbin/klogd" ]
&& killproc klogd
echo
[ $RETVAL -eq 0 ] && rm -f "/var/lock/subsys/${INIT_NAME}"
;;
status)
status $INIT_PROG
RETVAL=$?
;;
restart|reload)
$0 stop
$0 start
RETVAL=$?
;;
*)
echo "Usage: $0 {start|stop|status|restart|reload}"
exit 1
esac
exit
$RETVAL