sysklogd/test/start.sh
Joachim Nilsson 62c651a979 Adapt unit tests to leverage and test /etc/syslog.d/*.conf support
Signed-off-by: Joachim Nilsson <troglobit@gmail.com>
2019-11-02 11:47:45 +01:00

28 lines
395 B
Bash
Executable File

#!/bin/sh
. ./test.rc
if [ x"${srcdir}" = x ]; then
srcdir=.
fi
mkdir -p ${CONFD}
cat <<EOF > ${CONF}
# Nothing here yo
include ${CONFD}/*.conf
EOF
cat <<EOF > ${CONFD}/foo.conf
# Local log file, avoid sync to disk
*.* -${LOG}
EOF
cat <<EOF > ${CONFD}/bar.conf
# For remote logging
*.* @127.0.0.2
EOF
../src/syslogd -b :${PORT} -d -n -f ${CONF} -p ${SOCK} &
echo "$!" > ${PID}
sleep 1