| diff -uap varnish-5.1.3/redhat/varnish.logrotate.scl varnish-5.1.3/redhat/varnish.logrotate |
| |
| |
| @@ -1,10 +1,10 @@ |
| -/var/log/varnish/varnishncsa.log { |
| +$logdir/varnishncsa.log { |
| daily |
| rotate 7 |
| compress |
| delaycompress |
| missingok |
| postrotate |
| - /bin/kill -HUP `cat /var/run/varnishncsa.pid /run/varnishncsa/varnishncsa.pid 2>/dev/null` 2> /dev/null || true |
| + /bin/kill -HUP `cat $rundir/varnishlog.pid $rundir/varnishncsa.pid 2>/dev/null` 2> /dev/null || true |
| endscript |
| } |
| diff -uap varnish-5.1.3/redhat/varnishncsa.initrc.scl varnish-5.1.3/redhat/varnishncsa.initrc |
| |
| |
| @@ -22,17 +22,17 @@ |
| . /etc/init.d/functions |
| |
| retval=0 |
| -pidfile="/var/run/varnishncsa.pid" |
| -lockfile="/var/lock/subsys/varnishncsa" |
| -logfile="/var/log/varnish/varnishncsa.log" |
| +pidfile="$rundir/varnishncsa.pid" |
| +lockfile="$localstatedir/lock/subsys/varnishncsa" |
| +logfile="$logdir/varnishncsa.log" |
| |
| -exec="/usr/bin/varnishncsa" |
| +exec="$bindir/varnishncsa" |
| prog="varnishncsa" |
| |
| DAEMON_OPTS="-a -w $logfile -D -P $pidfile" |
| |
| # Include varnishncsa defaults |
| -[ -e /etc/sysconfig/varnishncsa ] && . /etc/sysconfig/varnishncsa |
| +[ -e $sysconfdir/sysconfig/varnishncsa ] && . $sysconfdir/sysconfig/varnishncsa |
| |
| start() { |
| |
| diff -uap varnish-5.1.3/redhat/varnishncsa.service.scl varnish-5.1.3/redhat/varnishncsa.service |
| |
| |
| @@ -1,14 +1,13 @@ |
| [Unit] |
| Description=Varnish Cache HTTP accelerator NCSA logging daemon |
| -After=varnish.service |
| +After=$name.service |
| |
| [Service] |
| -RuntimeDirectory=varnishncsa |
| Type=forking |
| -PIDFile=/run/varnishncsa/varnishncsa.pid |
| +PIDFile=$rundir/varnishncsa.pid |
| User=varnishlog |
| Group=varnish |
| -ExecStart=/usr/bin/varnishncsa -a -w /var/log/varnish/varnishncsa.log -D -P /run/varnishncsa/varnishncsa.pid |
| +ExecStart=$bindir/varnishncsa -a -w $logdir/varnishncsa.log -D -P $rundir/varnishncsa.pid |
| ExecReload=/bin/kill -HUP $MAINPID |
| |
| [Install] |
| diff -uap varnish-5.1.3/redhat/varnish.params.scl varnish-5.1.3/redhat/varnish.params |
| |
| |
| @@ -10,7 +10,7 @@ |
| #WARMUP_TIME=0 |
| |
| # Main configuration file. You probably want to change it. |
| -VARNISH_VCL_CONF=/etc/varnish/default.vcl |
| +VARNISH_VCL_CONF=$sysconfdir/varnish/default.vcl |
| |
| # Default address and port to bind to. Blank address means all IPv4 |
| # and IPv6 interfaces, otherwise specify a host name, an IPv4 dotted |
| @@ -23,7 +23,7 @@ |
| VARNISH_ADMIN_LISTEN_PORT=6082 |
| |
| # Shared secret file for admin interface |
| -VARNISH_SECRET_FILE=/etc/varnish/secret |
| +VARNISH_SECRET_FILE=$sysconfdir/varnish/secret |
| |
| # Backend storage specification, see Storage Types in the varnishd(5) |
| # man page for details. |
| diff -uap varnish-5.1.3/redhat/varnish.service.scl varnish-5.1.3/redhat/varnish.service |
| |
| |
| @@ -1,15 +1,13 @@ |
| +# If you want to make changes to this file, please create |
| +# an override file via "systemctl edit $name". |
| +# |
| +# Environment variables may be found in $sysconfdir/varnish/varnish.params |
| +# |
| [Unit] |
| Description=Varnish Cache, a high-performance HTTP accelerator |
| After=network.target |
| |
| [Service] |
| -# If you want to make changes to this file, please copy it to |
| -# /etc/systemd/system/varnish.service and make your changes there. |
| -# This will override the file kept at /lib/systemd/system/varnish.service |
| -# |
| -# Enviroment variables may be found in /etc/varnish/varnish.params |
| -# |
| - |
| # Maximum number of open files (for ulimit -n) |
| LimitNOFILE=131072 |
| |
| @@ -23,22 +21,20 @@ |
| # Maximum size of the corefile. |
| LimitCORE=infinity |
| |
| -EnvironmentFile=/etc/varnish/varnish.params |
| +EnvironmentFile=$sysconfdir/varnish/varnish.params |
| |
| Type=forking |
| -PIDFile=/var/run/varnish.pid |
| +PIDFile=$rundir/varnish.pid |
| PrivateTmp=true |
| -ExecStart=/usr/sbin/varnishd \ |
| - -P /var/run/varnish.pid \ |
| +ExecStart=$sbindir/varnishd \ |
| + -P $rundir/varnish.pid \ |
| -f $VARNISH_VCL_CONF \ |
| -a ${VARNISH_LISTEN_ADDRESS}:${VARNISH_LISTEN_PORT} \ |
| -T ${VARNISH_ADMIN_LISTEN_ADDRESS}:${VARNISH_ADMIN_LISTEN_PORT} \ |
| -S $VARNISH_SECRET_FILE \ |
| -s $VARNISH_STORAGE \ |
| $DAEMON_OPTS |
| - |
| -ExecReload=/usr/sbin/varnish_reload_vcl |
| +ExecReload=$sbindir/varnish_reload_vcl |
| |
| [Install] |
| WantedBy=multi-user.target |
| - |