Sophie

Sophie

distrib > Mageia > 5 > x86_64 > media > core-release > by-pkgid > b354d8f0c3e45e5a4f73f60610ed6152 > scriptlet

rsyslog-8.4.2-6.mga5.x86_64.rpm

PREUN

/bin/sh
/usr/share/rpm-helper/del-service rsyslog $1 rsyslog 


#(eatdirt)
#restore the previously saved /etc/systemd/journald.conf file
if [ "$1" -eq "0" ]; then
  /usr/sbin/rsyslog_switchfwd /etc/systemd off

# restart systemd-journal
  /bin/systemctl try-restart systemd-journald || :
fi

POSTIN

/bin/sh

# (eatdirt)
# switch ForwardToSyslog=yes in /etc/systemd/journald.conf + backup
/usr/sbin/rsyslog_switchfwd /etc/systemd on
# restart systemd-journal
/bin/systemctl try-restart systemd-journald || :

/usr/share/rpm-helper/add-service rsyslog $1 rsyslog 

# (cg) Handle a quirk of syslog service installations
if [ -f /etc/systemd/system/multi-user.target.wants/rsyslog.service -a ! -f /etc/systemd/system/syslog.service ]; then
  /usr/bin/cp -a /etc/systemd/system/multi-user.target.wants/rsyslog.service /etc/systemd/system/syslog.service
fi

for n in /var/log/{messages,secure,maillog,spooler}; do
    [ -f $n ] && continue
    umask 066 && touch $n
done

POSTUN

/bin/sh
if [ "$1" -ge "1" ]; then
    /bin/systemctl try-restart rsyslog.service || :
fi