Sophie

Sophie

distrib > Mageia > 8 > i586 > media > core-release > by-pkgid > 4df33c3bde534dc9c693816956ddfee5 > scriptlet

rspamd-2.5-2.mga8.i586.rpm

PREIN

/bin/sh
/usr/sbin/groupadd -r _rspamd 2>/dev/null || :
/usr/sbin/useradd -g _rspamd -c "Rspamd user" -s /bin/false -r -d /var/lib/rspamd _rspamd 2>/dev/null || :

PREUN

/bin/sh

 
if [ $1 -eq 0 ] && [ -x /usr/bin/systemctl ]; then 
        # Package removal, not upgrade 
        /usr/bin/systemctl --no-reload disable --now rspamd.service || : 
fi

POSTIN

/bin/sh
/usr/bin/systemd-tmpfiles --create rspamd.conf 

#to allow easy upgrade from 0.8.1
/usr/bin/chown -R _rspamd:_rspamd /var/lib/rspamd
#Macro is not used as we want to do this on upgrade
#%systemd_post %{name}.service
systemctl --no-reload preset rspamd.service >/dev/null 2>&1 || :
/usr/bin/chown _rspamd:_rspamd /var/log/rspamd

POSTUN

/bin/sh

 
if [ $1 -ge 1 ] && [ -x /usr/bin/systemctl ]; then 
        # Package upgrade, not uninstall 
        /usr/bin/systemctl try-restart rspamd.service || : 
fi