diff options
Diffstat (limited to '')
-rwxr-xr-x | modules.d/98syslog/rsyslogd-stop.sh | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/modules.d/98syslog/rsyslogd-stop.sh b/modules.d/98syslog/rsyslogd-stop.sh new file mode 100755 index 0000000..3fc2a5f --- /dev/null +++ b/modules.d/98syslog/rsyslogd-stop.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +type getarg > /dev/null 2>&1 || . /lib/dracut-lib.sh + +# Kills rsyslogd + +if [ -f /var/run/syslogd.pid ]; then + read -r pid < /var/run/syslogd.pid + kill "$pid" + kill -0 "$pid" && kill -9 "$pid" +else + warn "rsyslogd-stop: Could not find a pid for rsyslogd. Won't kill it." +fi |