Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
pkg-varnish-cache
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Commits
Open sidebar
varnishcache
pkg-varnish-cache
Commits
da5cfe2e
Commit
da5cfe2e
authored
Sep 07, 2016
by
Lasse Karstensen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Retire varnishlog init script.
It doesn't make much sense to have this by default.
parent
c4ae0637
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
0 additions
and
147 deletions
+0
-147
rules
debian/rules
+0
-1
varnish.logrotate
debian/varnish.logrotate
+0
-14
varnish.varnishlog.default
debian/varnish.varnishlog.default
+0
-12
varnish.varnishlog.init
debian/varnish.varnishlog.init
+0
-105
varnishlog.service
debian/varnishlog.service
+0
-15
No files found.
debian/rules
View file @
da5cfe2e
...
...
@@ -73,7 +73,6 @@ override_dh_gencontrol:
# Override to add several init scripts
override_dh_installinit:
dh_installinit -a
dh_installinit --name=varnishlog
dh_installinit --name=varnishncsa
override_dh_compress:
...
...
debian/varnish.logrotate
View file @
da5cfe2e
/var/log/varnish/varnish.log {
daily
rotate 7
compress
delaycompress
missingok
postrotate
if [ -d /run/systemd/system ]; then
systemctl -q is-active varnishlog.service || exit 0
fi
/usr/sbin/invoke-rc.d varnishlog reload > /dev/null
endscript
}
/var/log/varnish/varnishncsa.log {
daily
rotate 7
...
...
debian/varnish.varnishlog.default
deleted
100644 → 0
View file @
c4ae0637
# Configuration file for varnishlog
#
# Note: If systemd is installed, this file is obsolete and ignored. You will
# need to copy /lib/systemd/system/varnishlog.service to /etc/systemd/system/
# and edit that file.
#
# Uncomment this to enable logging for varnish. Please make sure you have
# enough disk space for significant amounts of log data. To disable logging,
# set the variable to "0", "no", or leave it unset.
#
# Varnish log format, to be used by "varnishlog" or "varnishncsa"
# VARNISHLOG_ENABLED=1
debian/varnish.varnishlog.init
deleted
100644 → 0
View file @
c4ae0637
#! /bin/sh
### BEGIN INIT INFO
# Provides: varnishlog
# Required-Start: $local_fs $remote_fs $network varnish
# Required-Stop: $local_fs $remote_fs $network varnish
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start HTTP accelerator log daemon
# Description: This script provides logging for varnish
### END INIT INFO
# Source function library
.
/lib/lsb/init-functions
NAME
=
varnishlog
DESC
=
"HTTP accelerator log deamon"
PATH
=
/sbin:/bin:/usr/sbin:/usr/bin
DAEMON
=
/usr/bin/
$NAME
PIDFILE
=
/run/
$NAME
/
$NAME
.pid
LOGFILE
=
/var/log/varnish/varnish.log
USER
=
varnishlog
DAEMON_OPTS
=
"-a -w
${
LOGFILE
}
-D -P
$PIDFILE
"
# Include defaults if available
if
[
-f
/etc/default/
$NAME
]
;
then
.
/etc/default/
$NAME
fi
# If unset, or set to "0" or "no", exit
if
[
-z
"
${
VARNISHLOG_ENABLED
}
"
]
||
\
[
"
${
VARNISHLOG_ENABLED
}
"
=
"0"
]
||
\
[
"
${
VARNISHLOG_ENABLED
}
"
=
"no"
]
;
then
exit
0
;
fi
test
-x
$DAEMON
||
{
echo
"
${
DAEMON
}
has no execute bit"
;
exit
0
;
}
start_varnishlog
()
{
output
=
$(
/bin/tempfile
-s
.varnish
)
log_daemon_msg
"Starting
$DESC
"
"
$SERVICE
"
create_pid_directory
if
start-stop-daemon
--start
--pidfile
${
PIDFILE
}
\
--chuid
$USER
--exec
${
DAEMON
}
--
${
DAEMON_OPTS
}
\
>
${
output
}
2>&1
;
then
log_end_msg 0
else
log_end_msg 1
cat
$output
exit
1
fi
rm
$output
}
stop_varnishlog
(){
log_daemon_msg
"Stopping
$DESC
"
"
$SERVICE
"
if
start-stop-daemon
--stop
--pidfile
$PIDFILE
\
--retry
10
--exec
$DAEMON
;
then
log_end_msg 0
else
log_end_msg 1
fi
}
reload_varnishlog
(){
log_daemon_msg
"Reloading
$DESC
"
"
$SERVICE
"
if
kill
-HUP
$(
cat
$PIDFILE
)
>
/dev/null 2>&1
;
then
log_end_msg 0
else
log_end_msg 1
exit
1
fi
}
status_varnishlog
(){
status_of_proc
-p
"
${
PIDFILE
}
"
"
${
DAEMON
}
"
"
${
SERVICE
}
"
exit
$?
}
create_pid_directory
()
{
install
-o
$USER
-g
$USER
-d
$(
dirname
$PIDFILE
)
}
case
"
$1
"
in
start
)
start_varnishlog
;;
stop
)
stop_varnishlog
;;
reload
)
reload_varnishlog
;;
status
)
status_varnishlog
;;
restart|force-reload
)
$0
stop
$0
start
;;
*
)
log_success_msg
"Usage:
$0
{start|stop|restart|force-reload|reload}"
exit
1
;;
esac
debian/varnishlog.service
deleted
100644 → 0
View file @
c4ae0637
[Unit]
Description=Varnish Cache HTTP accelerator logging daemon
After=varnish.service
[Service]
RuntimeDirectory=varnishlog
Type=forking
PIDFile=/run/varnishlog/varnishlog.pid
User=varnishlog
Group=varnish
ExecStart=/usr/bin/varnishlog -a -w /var/log/varnish/varnish.log -D -P /run/varnishlog/varnishlog.pid
ExecReload=/bin/kill -HUP $MAINPID
[Install]
WantedBy=multi-user.target
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment