Sophie

Sophie

distrib > Mageia > 6 > x86_64 > media > core-updates > by-pkgid > 38c7c0dc7d73c95a0153e3e48cbf566c > scriptlet

varnish-5.0.0-3.2.mga6.x86_64.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