-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA256

varnish-4.1.0 does no longer support the -u user option. This changes the
various variants of redhat startup scripts to use the unix "jail" variant.

Ingvar

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQIcBAEBCAAGBQJV3jNhAAoJEB4pl4iKhgvRafEP/0diip1SqH5xZoXqL7R8kUGV
OpSpWpC2f/rJsPNVtZP+/ZSUyKg4bKn6eGff0F/2O2KY59a2Cv21KRytA3dptECQ
pBJzFw4r2BiG62BmbMHeb95Vdbs81wh/h2EdagAK9J/PwwRPIhAk8jsvoEd6Q7ms
sgkfaw30wNDvN1DVxUn6Wwhqs/igi1Ssm2lav5VzhfaLmCnkmkMZ2FG2PJ9R8w/M
ekzX1hy/Q6Qh6cPb+OH2CgQN5l5C4XO0ep3Xn/44gU/eA5FqfNKiFpOlhfCPWtSX
lwHoKU4LL7DOHK3UnX+elsG0iwjGyXJ70ATKzhSz7sj7e4QBMe2eko6XEzHCiID6
54EqBVwR+zrQfyLiOPy1pGGqc1IcRPiYnwWwkGqRRiRyyG1gUq6NPPb8cOkfBj0W
t08Yz/HMrfK5NYDK2pLLW+ZH7mf0vCFSSSzDmIxTLnAgBl6xZ4PrqIkgRioht3xQ
gz4FIzyNwSbu1zqLmkYUgIqcs+y68pi+BZvgUjFu8r+Vghvsn51doWh2yfB6fhLu
OTdzls4faj58mcu/kKWePAaxKj60OMy45d+3lSaKbcxh0zzdUwJrbD6qYUFLkXA7
56hQF41VMlBniTOUVHgf8k3WEU7srYDzq3XfLG1YGDDD+fHIjchRPinmi6mCEYBU
OtB94xkXNdg6Au6YMKVY
=gcyH
-----END PGP SIGNATURE-----
diff --git a/redhat/varnish.initrc b/redhat/varnish.initrc
index 67b530a..681fcdc 100755
--- a/redhat/varnish.initrc
+++ b/redhat/varnish.initrc
@@ -74,7 +74,7 @@ start() {
 		return 6
 	else
 		# Varnish always gives output on STDOUT
-		daemon --pidfile $pidfile  $exec -P $pidfile "$DAEMON_OPTS" > /dev/null 2>&1
+		daemon --pidfile $pidfile $exec "$DAEMON_OPTS" -P $pidfile > /dev/null 2>&1
 		retval=$?
 		if [ $retval -eq 0 ]
 		then
diff --git a/redhat/varnish.params b/redhat/varnish.params
index 27a14dd..3a90896 100644
--- a/redhat/varnish.params
+++ b/redhat/varnish.params
@@ -27,9 +27,5 @@ VARNISH_STORAGE="file,/var/lib/varnish/varnish_storage.bin,1G"
 # Default TTL used when the backend does not specify one
 VARNISH_TTL=120
 
-# User and group for the varnishd worker processes
-VARNISH_USER=varnish
-VARNISH_GROUP=varnish
-
 # Other options, see the man page varnishd(1)
 #DAEMON_OPTS="-p thread_pool_min=5 -p thread_pool_max=500 -p thread_pool_timeout=300"
diff --git a/redhat/varnish.service b/redhat/varnish.service
index 659dba2..328dbc7 100644
--- a/redhat/varnish.service
+++ b/redhat/varnish.service
@@ -28,13 +28,12 @@ Type=forking
 PIDFile=/var/run/varnish.pid
 PrivateTmp=true
 ExecStart=/usr/sbin/varnishd \
+	-j unix \
 	-P /var/run/varnish.pid \
 	-f $VARNISH_VCL_CONF \
 	-a ${VARNISH_LISTEN_ADDRESS}:${VARNISH_LISTEN_PORT} \
 	-T ${VARNISH_ADMIN_LISTEN_ADDRESS}:${VARNISH_ADMIN_LISTEN_PORT} \
 	-t $VARNISH_TTL \
-	-u $VARNISH_USER \
-	-g $VARNISH_GROUP \
 	-S $VARNISH_SECRET_FILE \
 	-s $VARNISH_STORAGE \
 	$DAEMON_OPTS
diff --git a/redhat/varnish.sysconfig b/redhat/varnish.sysconfig
index 6aa2354..61de039 100644
--- a/redhat/varnish.sysconfig
+++ b/redhat/varnish.sysconfig
@@ -31,10 +31,10 @@ RELOAD_VCL=1
 # Listen on port 6081, administration on localhost:6082, and forward to
 # content server on localhost:8080.  Use a fixed-size cache file.
 #
-#DAEMON_OPTS="-a :6081 \
+#DAEMON_OPTS="-j unix \
+#             -a :6081 \
 #             -T localhost:6082 \
 #             -b localhost:8080 \
-#             -u varnish -g varnish \
 #             -s file,/var/lib/varnish/varnish_storage.bin,1G"
 
 
@@ -44,10 +44,10 @@ RELOAD_VCL=1
 # one content server selected by the vcl file, based on the request.  Use a
 # fixed-size cache file.
 #
-#DAEMON_OPTS="-a :6081 \
+#DAEMON_OPTS="-j unix \
+#             -a :6081 \
 #             -T localhost:6082 \
 #             -f /etc/varnish/default.vcl \
-#             -u varnish -g varnish \
 #             -S /etc/varnish/secret \
 #             -s file,/var/lib/varnish/varnish_storage.bin,1G"
 
@@ -93,14 +93,14 @@ VARNISH_TTL=120
 #
 # # DAEMON_OPTS is used by the init script.  If you add or remove options, make
 # # sure you update this section, too.
-DAEMON_OPTS="-a ${VARNISH_LISTEN_ADDRESS}:${VARNISH_LISTEN_PORT} \
+DAEMON_OPTS="-j unix \
+             -a ${VARNISH_LISTEN_ADDRESS}:${VARNISH_LISTEN_PORT} \
              -f ${VARNISH_VCL_CONF} \
              -T ${VARNISH_ADMIN_LISTEN_ADDRESS}:${VARNISH_ADMIN_LISTEN_PORT} \
              -t ${VARNISH_TTL} \
              -p thread_pool_min=${VARNISH_MIN_THREADS} \
              -p thread_pool_max=${VARNISH_MAX_THREADS} \
              -p thread_pool_timeout=${VARNISH_THREAD_TIMEOUT} \
-             -u varnish -g varnish \
              -S ${VARNISH_SECRET_FILE} \
              -s ${VARNISH_STORAGE}"
 #
_______________________________________________
varnish-dev mailing list
[email protected]
https://www.varnish-cache.org/lists/mailman/listinfo/varnish-dev

Reply via email to