summaryrefslogtreecommitdiffstats
path: root/tests/killrsyslog.sh
blob: e5f23281c2f47172f5b09cc7dbb7be5658a7f7e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
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