forked from pool/varnish
Accepting request 1004422 from home:bmwiedemann:branches:server:http
- Fix logrotate - Add service reload There is still trouble with systemctl stop varnish that takes too long. OBS-URL: https://build.opensuse.org/request/show/1004422 OBS-URL: https://build.opensuse.org/package/show/server:http/varnish?expand=0&rev=114
This commit is contained in:
parent
294631b11c
commit
e21e452795
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Sun Sep 18 03:26:45 UTC 2022 - Bernhard Wiedemann <bwiedemann@suse.com>
|
||||||
|
|
||||||
|
- Fix logrotate
|
||||||
|
- Add service reload
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Aug 12 10:32:58 UTC 2022 - Jan Engelhardt <jengelh@inai.de>
|
Fri Aug 12 10:32:58 UTC 2022 - Jan Engelhardt <jengelh@inai.de>
|
||||||
|
|
||||||
|
@ -5,6 +5,6 @@
|
|||||||
sharedscripts
|
sharedscripts
|
||||||
delaycompress
|
delaycompress
|
||||||
postrotate
|
postrotate
|
||||||
/etc/init.d/varnish reload
|
/usr/bin/systemctl restart varnishlog
|
||||||
endscript
|
endscript
|
||||||
}
|
}
|
||||||
|
@ -19,6 +19,7 @@ RestrictRealtime=true
|
|||||||
EnvironmentFile=/etc/sysconfig/varnish
|
EnvironmentFile=/etc/sysconfig/varnish
|
||||||
PIDFile=/var/run/varnishd.pid
|
PIDFile=/var/run/varnishd.pid
|
||||||
ExecStart=/usr/sbin/varnishd -P /var/run/varnishd.pid -F $VARNISHD_PARAMS
|
ExecStart=/usr/sbin/varnishd -P /var/run/varnishd.pid -F $VARNISHD_PARAMS
|
||||||
|
ExecReload=/usr/sbin/varnish_reload_vcl
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
@ -37,6 +37,7 @@ Source3: varnish.sysconfig
|
|||||||
Source5: varnish.logrotate
|
Source5: varnish.logrotate
|
||||||
Source7: varnish.service
|
Source7: varnish.service
|
||||||
Source8: varnishlog.service
|
Source8: varnishlog.service
|
||||||
|
Source9: varnish_reload_vcl
|
||||||
Patch1: varnish-5.1.2-add-fallthrough-comments.patch
|
Patch1: varnish-5.1.2-add-fallthrough-comments.patch
|
||||||
Patch2: uninit.patch
|
Patch2: uninit.patch
|
||||||
BuildRequires: libxslt-devel
|
BuildRequires: libxslt-devel
|
||||||
@ -120,6 +121,7 @@ install -Dpm 0644 "%SOURCE8" "$b/%_unitdir/varnishlog.service"
|
|||||||
mkdir -p "$b/%_sbindir"
|
mkdir -p "$b/%_sbindir"
|
||||||
ln -s service "$b/%_sbindir/rcvarnish"
|
ln -s service "$b/%_sbindir/rcvarnish"
|
||||||
ln -s service "$b/%_sbindir/rcvarnishlog"
|
ln -s service "$b/%_sbindir/rcvarnishlog"
|
||||||
|
install -Dpm 0755 "%SOURCE9" "$b/%_sbindir/varnish_reload_vcl"
|
||||||
#
|
#
|
||||||
##config files
|
##config files
|
||||||
mkdir -p "$b/%_sysconfdir/%name"
|
mkdir -p "$b/%_sysconfdir/%name"
|
||||||
|
11
varnish_reload_vcl
Normal file
11
varnish_reload_vcl
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Generate a unique timestamp ID for this version of the VCL
|
||||||
|
TIME=$(date +%s)
|
||||||
|
|
||||||
|
vadm="varnishadm -S /var/cache/varnish/varnishd/_.secret -T 127.0.0.1:6082"
|
||||||
|
# Load the file into memory
|
||||||
|
$vadm vcl.load varnish_$TIME /etc/varnish/vcl.conf
|
||||||
|
|
||||||
|
# Active this Varnish config
|
||||||
|
$vadm vcl.use varnish_$TIME
|
Loading…
x
Reference in New Issue
Block a user