rsyslog/tests/killrsyslog.sh
Andre Lorbach df3d4a3922 test-suite: Added !#/bin/bash into all test scripts.
Most of the tests will not work in other default shells like
on Freebsd or Solaris. So we make /bin/bash default now.
2015-07-30 15:38:17 +00:00

17 lines
411 B
Bash
Executable File

#!/bin/bash
#check if rsyslog instance exists and, if so, kill it
if [ -e "rsyslog.pid" ]
then
echo rsyslog.pid exists, trying to shut down rsyslogd process `cat rsyslog.pid`.
kill -9 `cat rsyslog.pid`
sleep 1
rm rsyslog.pid
fi
if [ -e "rsyslog2.pid" ]
then
echo rsyslog2.pid exists, trying to shut down rsyslogd process `cat rsyslog2.pid`.
kill -9 `cat rsyslog2.pid`
sleep 1
rm rsyslog2.pid
fi