LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   scripting in /etc/sysconfig/syslog file? (https://www.linuxquestions.org/questions/linux-general-1/scripting-in-etc-sysconfig-syslog-file-273749/)

SheldonPlankton 01-04-2005 11:47 AM

scripting in /etc/sysconfig/syslog file?
 
Hi,

I want to be able to start my syslogd with different syslog.conf file depending on certain conditions ...

Here's a simpified example of what I am doing ...

# cd /etc/sysconfig
# cat syslog
PRIMARY_CONF=/etc/syslog.cong.primary

HOSTNAME=`hostname`
if [ $HOSTNAME = 'XYZ' ]
then
SYSLOGD_OPTIONS="-r -x -m 0 -f $PRIMARY_CONF"
else
SYSLOGD_OPTIONS="-r -x -m 0"
fi

...


But when I do my /etc/init.d/syslog syslogd fails to start. Since I am dealing with the syslogd it is kinda of hard to debug. Has anyone here ever tried to do something like this? Is it just not possible to do anything besides setting env. variables in the /etc/sysconfig/* files?

Thanks


All times are GMT -5. The time now is 02:40 PM.