summaryrefslogtreecommitdiffstats
path: root/tests/killrsyslog.sh
diff options
context:
space:
mode:
Diffstat (limited to 'tests/killrsyslog.sh')
-rwxr-xr-xtests/killrsyslog.sh16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/killrsyslog.sh b/tests/killrsyslog.sh
new file mode 100755
index 0000000..e5f2328
--- /dev/null
+++ b/tests/killrsyslog.sh
@@ -0,0 +1,16 @@
+#!/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