2019-10-29 15:38:23 +05:30
|
|
|
#!/bin/sh
|
|
|
|
if [ x"${srcdir}" = x ]; then
|
|
|
|
srcdir=.
|
|
|
|
fi
|
2019-11-07 23:28:25 +05:30
|
|
|
. ${srcdir}/test.rc
|
2019-10-29 15:38:23 +05:30
|
|
|
|
2019-11-02 16:17:24 +05:30
|
|
|
mkdir -p ${CONFD}
|
2019-10-30 21:44:29 +05:30
|
|
|
cat <<EOF > ${CONF}
|
2019-11-02 16:17:24 +05:30
|
|
|
# Nothing here yo
|
|
|
|
include ${CONFD}/*.conf
|
|
|
|
EOF
|
|
|
|
|
|
|
|
cat <<EOF > ${CONFD}/foo.conf
|
|
|
|
# Local log file, avoid sync to disk
|
2019-10-29 15:38:23 +05:30
|
|
|
*.* -${LOG}
|
2019-11-02 16:17:24 +05:30
|
|
|
EOF
|
|
|
|
|
|
|
|
cat <<EOF > ${CONFD}/bar.conf
|
|
|
|
# For remote logging
|
2019-11-12 13:54:26 +05:30
|
|
|
*.* @127.0.0.2:${PORT}
|
2019-10-29 15:38:23 +05:30
|
|
|
EOF
|
|
|
|
|
2019-11-07 23:28:47 +05:30
|
|
|
../src/syslogd -b :${PORT} -d -n -f ${CONF} -p ${SOCK} -p ${ALTSOCK} &
|
2019-10-30 21:44:29 +05:30
|
|
|
echo "$!" > ${PID}
|
2019-10-29 15:38:23 +05:30
|
|
|
|
2019-11-07 23:28:47 +05:30
|
|
|
sleep 2
|
2019-11-04 00:21:02 +05:30
|
|
|
kill -USR1 `cat ${PID}`
|
|
|
|
sleep 1
|