summaryrefslogtreecommitdiffstats
path: root/modules.d/98syslog/rsyslogd-stop.sh
blob: 3fc2a5f70b49ed1b3d5e25b6178aad1775406aec (plain)
1
2
3
4
5
6
7
8
9
10
11
12
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