30 lines
No EOL
509 B
Bash
Executable file
30 lines
No EOL
509 B
Bash
Executable file
#!/bin/sh
|
|
|
|
SL_CONF=/etc/syslog.conf
|
|
if [ -f $SL_CONF ] ; then
|
|
chmod +x $SL_CONF
|
|
. $SL_CONF
|
|
else
|
|
exit 0
|
|
fi
|
|
|
|
logMode=$Mode
|
|
servIP=$ServerIP
|
|
servPort=$ServerPort
|
|
remoteSeverity=$RemoteSeverity
|
|
if [ "$logMode" = "Local" ] ; then
|
|
|
|
/sbin/syslogd -n -s 126 -b 3 -L &
|
|
|
|
/sbin/klogd -n &
|
|
|
|
else
|
|
if [ $remoteSeverity != "" ] ; then
|
|
/sbin/syslogd -n -s 126 -b 3 -L -R $ServerIP -P $ServerPort -r $RemoteSeverity &
|
|
else
|
|
/sbin/syslogd -n -s 126 -b 3 -L -R $ServerIP -P $ServerPort &
|
|
fi
|
|
|
|
/sbin/klogd -n &
|
|
|
|
fi |