Sophie

Sophie

distrib > Mageia > 8 > i586 > media > core-release > by-pkgid > 7266965cf7fb58d4307a10414aa41a36 > scriptlet

varnish-6.5.1-1.mga8.i586.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 http accelerator user" varnish
exit 0

PREUN

/bin/sh
/usr/share/rpm-helper/del-service varnish $1 varnish varnish varnishlog varnishncsa

POSTIN

/bin/sh
if [ ! -f /etc/varnish/secret ]; then
	uuidgen > /etc/varnish/secret
	chown varnish:adm /etc/varnish/secret
	chmod 0660 /etc/varnish/secret

	# While not strictly related, we also need to fix storage permissions from
	# older versions and the lack of a secret file is a good indicator
	find /var/lib/varnish/ -uid 0 -exec chown varnish:varnish {} \;
fi
/usr/bin/systemd-tmpfiles --create varnish.conf 

/usr/share/rpm-helper/add-service varnish $1 varnish varnish varnishlog varnishncsa