2020-01-19 15:16:59 +05:30
|
|
|
#!/bin/sh
|
|
|
|
if [ x"${srcdir}" = x ]; then
|
|
|
|
srcdir=.
|
|
|
|
fi
|
2021-11-22 19:46:05 +05:30
|
|
|
. ${srcdir}/lib.sh
|
2020-01-19 15:16:59 +05:30
|
|
|
|
|
|
|
mkdir -p ${CONFD}
|
|
|
|
cat <<EOF > ${CONF}
|
|
|
|
# Match all log messages, store in RC5424 format and rotate every 10 MiB
|
|
|
|
*.* -${LOG} ;rotate=10M:5,RFC5424
|
|
|
|
EOF
|
|
|
|
|
|
|
|
../src/syslogd -m1 -b :${PORT} -d -sF -f ${CONF} -p ${SOCK} -p ${ALTSOCK} >${LOG2} &
|
|
|
|
echo "$!" > ${PID}
|
2021-11-22 19:46:05 +05:30
|
|
|
cat ${PID} >> "$DIR/PIDs"
|
2020-01-19 15:16:59 +05:30
|
|
|
|
2021-11-22 19:46:05 +05:30
|
|
|
sleep 2
|
|
|
|
grep ';RFC5424,rotate=10000000:5' ${LOG2} || FAIL "Failed parsing RFC542 .conf"
|