PREIN
/bin/sh
getent group systemd-journal-gateway >/dev/null 2>&1 || groupadd -r -g 191 systemd-journal-gateway 2>&1 || :
getent passwd systemd-journal-gateway >/dev/null 2>&1 || useradd -r -l -u 191 -g systemd-journal-gateway -d /var/log/journal -s /sbin/nologin -c "Journal Gateway" systemd-journal-gateway >/dev/null 2>&1 || :
PREUN
/bin/sh
if [ $1 -eq 0 ] ; then
# Package removal, not upgrade
systemctl --no-reload disable systemd-journal-gatewayd.socket systemd-journal-gatewayd.service > /dev/null 2>&1 || :
systemctl stop systemd-journal-gatewayd.socket systemd-journal-gatewayd.service > /dev/null 2>&1 || :
fi
POSTIN
/bin/sh
if [ $1 -eq 1 ] ; then
# Initial installation
systemctl preset systemd-journal-gatewayd.socket systemd-journal-gatewayd.service >/dev/null 2>&1 || :
fi
POSTUN
/bin/sh
systemctl daemon-reload >/dev/null 2>&1 || :
if [ $1 -ge 1 ] ; then
# Package upgrade, not uninstall
systemctl try-restart systemd-journal-gatewayd.service >/dev/null 2>&1 || :
fi