-
Notifications
You must be signed in to change notification settings - Fork 84
/
varnish.service
38 lines (30 loc) · 899 Bytes
/
varnish.service
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
[Unit]
Description=Varnish a high-perfomance HTTP accelerator
After=syslog.target network.target
OnFailure=service-status-mail@%n.service
[Service]
# Enviroment variables may be found in /etc/varnish/varnish.params
EnvironmentFile=/etc/varnish/varnish.params
# Maximum number of open files (for ulimit -n)
LimitNOFILE=131072
# Locked shared memory (for ulimit -l)
# Default log size is 82MB + header
LimitMEMLOCK=82000
# Maximum size of the corefile.
LimitCORE=infinity
Type=forking
PrivateTmp=false
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} \
-S $VARNISH_SECRET_FILE \
-s $VARNISH_STORAGE \
$DAEMON_OPTS
ExecReload=/usr/sbin/varnish_reload_vcl
Restart=on-failure
RestartSec=10
[Install]
WantedBy=multi-user.target