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
44fe858e
Commit
44fe858e
authored
Sep 07, 2016
by
Lasse Karstensen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Retire varnishlog init scripts in rpm files.
It doesn't make sense, drinking from the firehose like that.
parent
da5cfe2e
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
1 addition
and
151 deletions
+1
-151
varnish.logrotate
redhat/varnish.logrotate
+0
-11
varnish.spec
redhat/varnish.spec
+1
-9
varnishlog.initrc
redhat/varnishlog.initrc
+0
-116
varnishlog.service
redhat/varnishlog.service
+0
-15
No files found.
redhat/varnish.logrotate
View file @
44fe858e
/var/log/varnish/varnish.log {
daily
rotate 7
compress
delaycompress
missingok
postrotate
/bin/kill -HUP `cat /var/run/varnishlog.pid /run/varnishlog/varnishlog.pid 2>/dev/null` 2> /dev/null || true
endscript
}
/var/log/varnish/varnishncsa.log {
/var/log/varnish/varnishncsa.log {
daily
daily
rotate 7
rotate 7
...
...
redhat/varnish.spec
View file @
44fe858e
...
@@ -19,8 +19,6 @@ Source3: varnish.logrotate
...
@@ -19,8 +19,6 @@ Source3: varnish.logrotate
Source4: varnish_reload_vcl
Source4: varnish_reload_vcl
Source5: varnish.params
Source5: varnish.params
Source6: varnish.service
Source6: varnish.service
Source7: varnishlog.initrc
Source8: varnishlog.service
Source9: varnishncsa.initrc
Source9: varnishncsa.initrc
Source10: varnishncsa.service
Source10: varnishncsa.service
Source11: find-provides
Source11: find-provides
...
@@ -127,7 +125,7 @@ make %{?_smp_mflags} V=1
...
@@ -127,7 +125,7 @@ make %{?_smp_mflags} V=1
sed -i 's,--pidfile \$pidfile,,g;
sed -i 's,--pidfile \$pidfile,,g;
s,status -p \$pidfile,status,g;
s,status -p \$pidfile,status,g;
s,killproc -p \$pidfile,killproc,g' \
s,killproc -p \$pidfile,killproc,g' \
varnish.initrc varnish
log.initrc varnish
ncsa.initrc
varnish.initrc varnishncsa.initrc
%endif
%endif
# In 4.0 the built docs need to be copied to the current/4.1 location.
# In 4.0 the built docs need to be copied to the current/4.1 location.
...
@@ -180,13 +178,11 @@ mkdir -p %{buildroot}%{_unitdir}
...
@@ -180,13 +178,11 @@ mkdir -p %{buildroot}%{_unitdir}
install -D -m 0644 varnish.service %{buildroot}%{_unitdir}/varnish.service
install -D -m 0644 varnish.service %{buildroot}%{_unitdir}/varnish.service
install -D -m 0644 varnish.params %{buildroot}%{_sysconfdir}/varnish/varnish.params
install -D -m 0644 varnish.params %{buildroot}%{_sysconfdir}/varnish/varnish.params
install -D -m 0644 varnishncsa.service %{buildroot}%{_unitdir}/varnishncsa.service
install -D -m 0644 varnishncsa.service %{buildroot}%{_unitdir}/varnishncsa.service
install -D -m 0644 varnishlog.service %{buildroot}%{_unitdir}/varnishlog.service
sed -i 's,sysconfig/varnish,varnish/varnish.params,' varnish_reload_vcl
sed -i 's,sysconfig/varnish,varnish/varnish.params,' varnish_reload_vcl
# default is standard sysvinit
# default is standard sysvinit
%else
%else
install -D -m 0644 varnish.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/varnish
install -D -m 0644 varnish.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/varnish
install -D -m 0755 varnish.initrc %{buildroot}%{_initrddir}/varnish
install -D -m 0755 varnish.initrc %{buildroot}%{_initrddir}/varnish
install -D -m 0755 varnishlog.initrc %{buildroot}%{_initrddir}/varnishlog
install -D -m 0755 varnishncsa.initrc %{buildroot}%{_initrddir}/varnishncsa
install -D -m 0755 varnishncsa.initrc %{buildroot}%{_initrddir}/varnishncsa
%endif
%endif
install -D -m 0755 varnish_reload_vcl %{buildroot}%{_sbindir}/varnish_reload_vcl
install -D -m 0755 varnish_reload_vcl %{buildroot}%{_sbindir}/varnish_reload_vcl
...
@@ -216,14 +212,12 @@ rm -rf %{buildroot}
...
@@ -216,14 +212,12 @@ rm -rf %{buildroot}
%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7
%if 0%{?fedora} >= 17 || 0%{?rhel} >= 7
%{_unitdir}/varnish.service
%{_unitdir}/varnish.service
%{_unitdir}/varnishncsa.service
%{_unitdir}/varnishncsa.service
%{_unitdir}/varnishlog.service
%config(noreplace)%{_sysconfdir}/varnish/varnish.params
%config(noreplace)%{_sysconfdir}/varnish/varnish.params
# default is standard sysvinit
# default is standard sysvinit
%else
%else
%config(noreplace) %{_sysconfdir}/sysconfig/varnish
%config(noreplace) %{_sysconfdir}/sysconfig/varnish
%{_initrddir}/varnish
%{_initrddir}/varnish
%{_initrddir}/varnishlog
%{_initrddir}/varnishncsa
%{_initrddir}/varnishncsa
%endif
%endif
...
@@ -259,7 +253,6 @@ exit 0
...
@@ -259,7 +253,6 @@ exit 0
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
/bin/systemctl daemon-reload >/dev/null 2>&1 || :
%else
%else
/sbin/chkconfig --add varnish
/sbin/chkconfig --add varnish
/sbin/chkconfig --add varnishlog
/sbin/chkconfig --add varnishncsa
/sbin/chkconfig --add varnishncsa
%endif
%endif
test -f /etc/varnish/secret || (uuidgen > /etc/varnish/secret && chmod 0600 /etc/varnish/secret)
test -f /etc/varnish/secret || (uuidgen > /etc/varnish/secret && chmod 0600 /etc/varnish/secret)
...
@@ -291,7 +284,6 @@ if [ $1 -lt 1 ]; then
...
@@ -291,7 +284,6 @@ if [ $1 -lt 1 ]; then
/sbin/service varnishlog stop > /dev/null 2>&1
/sbin/service varnishlog stop > /dev/null 2>&1
/sbin/service varnishncsa stop > /dev/null 2>%1
/sbin/service varnishncsa stop > /dev/null 2>%1
/sbin/chkconfig --del varnish
/sbin/chkconfig --del varnish
/sbin/chkconfig --del varnishlog
/sbin/chkconfig --del varnishncsa
/sbin/chkconfig --del varnishncsa
%endif
%endif
fi
fi
...
...
redhat/varnishlog.initrc
deleted
100644 → 0
View file @
da5cfe2e
#! /bin/sh
#
# Control the Varnish Cache raw logging daemon
#
# chkconfig: - 90 10
# description: Varnish Cache raw logging daemon
# processname: varnishlog
# config:
# pidfile: /var/run/varnishlog.pid
### BEGIN INIT INFO
# Provides: varnishlog
# Required-Start: $network $local_fs $remote_fs
# Required-Stop: $network $local_fs $remote_fs
# Default-Start:
# Default-Stop:
# Short-Description: start and stop varnishlog
# Description: Varnish Cache raw logging daemon
### END INIT INFO
# Source function library.
.
/etc/init.d/functions
retval
=
0
pidfile
=
"/var/run/varnishlog.pid"
lockfile
=
"/var/lock/subsys/varnishlog"
logfile
=
"/var/log/varnish/varnish.log"
exec
=
"/usr/bin/varnishlog"
prog
=
"varnishlog"
DAEMON_OPTS
=
"-a -w
$logfile
-D -P
$pidfile
"
# Include varnishlog defaults
[
-e
/etc/sysconfig/varnishlog
]
&&
.
/etc/sysconfig/varnishlog
start
()
{
if
[
!
-x
$exec
]
then
echo
$exec
not found
exit
5
fi
echo
-n
"Starting varnish logging daemon: "
daemon
--pidfile
$pidfile
$exec
"
$DAEMON_OPTS
"
echo
return
$retval
}
stop
()
{
echo
-n
"Stopping varnish logging daemon: "
killproc
-p
$pidfile
$prog
retval
=
$?
echo
[
$retval
-eq
0
]
&&
rm
-f
$lockfile
return
$retval
}
restart
()
{
stop
start
}
reload
()
{
restart
}
force_reload
()
{
restart
}
rh_status
()
{
status
-p
$pidfile
$prog
}
rh_status_q
()
{
rh_status
>
/dev/null 2>&1
}
# See how we were called.
case
"
$1
"
in
start
)
rh_status_q
&&
exit
0
$1
;;
stop
)
rh_status_q
||
exit
0
$1
;;
restart
)
$1
;;
reload
)
rh_status_q
||
exit
7
$1
;;
force-reload
)
force_reload
;;
status
)
rh_status
;;
condrestart|try-restart
)
rh_status_q
||
exit
0
restart
;;
*
)
echo
"Usage:
$0
{start|stop|status|restart|condrestart|try-restart|reload|force-reload}"
exit
2
esac
exit
$?
redhat/varnishlog.service
deleted
100644 → 0
View file @
da5cfe2e
[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