Sophie

Sophie

distrib > Momonga > development > i686 > media > os > by-pkgid > 30c7fa4eee70d0cb6a7f8c94a1a52c85 > scriptlet

varnish-4.0.2-2m.mo8.i686.rpm

PREIN

/bin/sh
getent group varnish >/dev/null || groupadd -r varnish
getent passwd varnish >/dev/null || \
        useradd -r -g varnish -d /var/lib/varnish -s /sbin/nologin \
                -c "Varnish Cache" varnish
exit 0

PREUN

/bin/sh
if [ $1 -lt 1 ]; then
  # Package removal, not upgrade
  /bin/systemctl --no-reload disable varnish.service > /dev/null 2>&1 || :
  /bin/systemctl stop varnish.service > /dev/null 2>&1 || :
fi

POSTIN

/bin/sh
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
test -f /etc/varnish/secret || (uuidgen > /etc/varnish/secret && chmod 0600 /etc/varnish/secret)

Triggers

varnish < 3.0.2-1m

/bin/sh
# Save the current service runlevel info
# User must manually run systemd-sysv-convert --apply varnish
# to migrate them to systemd targets
/usr/bin/systemd-sysv-convert --save varnish >/dev/null 2>&1 ||:

# If the package is allowed to autostart:
#/bin/systemctl --no-reload enable varnish.service >/dev/null 2>&1 ||:

# Run these because the SysV package being removed won't do them
/sbin/chkconfig --del varnish >/dev/null 2>&1 || :
#/bin/systemctl try-restart varnish.service >/dev/null 2>&1 || :