testing: Use pkill to reload rsyslogd config/recreate log files

The PID location changes with newer Debian releases so it's more
portable this way.
This commit is contained in:
Tobias Brunner 2020-08-24 16:01:27 +02:00
parent d538b22afe
commit 3d1e2c56df
1 changed files with 2 additions and 2 deletions

View File

@ -154,7 +154,7 @@ for host in $IPSECHOSTS
do
eval HOSTLOGIN=root@\$ipv4_${host}
ssh $SSHCONF $HOSTLOGIN 'rm -f /var/log/auth.log /var/log/daemon.log; \
kill -SIGHUP `cat /var/run/rsyslogd.pid`' > /dev/null 2>&1
pkill -SIGHUP rsyslogd' > /dev/null 2>&1
done
@ -166,5 +166,5 @@ for host in $RADIUSHOSTS
do
eval HOSTLOGIN=root@\$ipv4_${host}
ssh $SSHCONF $HOSTLOGIN 'rm -f /var/log/daemon.log /var/log/freeradius/radius.log; \
kill -SIGHUP `cat /var/run/rsyslogd.pid`' > /dev/null 2>&1
pkill -SIGHUP rsyslogd' > /dev/null 2>&1
done