diff options
author | Christian Ruppert <idl0r@gentoo.org> | 2010-05-08 20:59:54 +0200 |
---|---|---|
committer | Christian Ruppert <idl0r@gentoo.org> | 2010-05-08 20:59:54 +0200 |
commit | 1ff9d16ffbe1aacf41d75b20f580e401f6f6dd4f (patch) | |
tree | a841b1904e71682d2e73cf711e6cbb0c3533ab01 | |
parent | Add VERSION constant and print it if no arguments are given. (diff) | |
download | fifo-cronolog-1ff9d16ffbe1aacf41d75b20f580e401f6f6dd4f.tar.gz fifo-cronolog-1ff9d16ffbe1aacf41d75b20f580e401f6f6dd4f.tar.bz2 fifo-cronolog-1ff9d16ffbe1aacf41d75b20f580e401f6f6dd4f.zip |
Add init script and its config file.
-rw-r--r-- | squid-cronolog.confd | 4 | ||||
-rw-r--r-- | squid-cronolog.initd | 22 |
2 files changed, 26 insertions, 0 deletions
diff --git a/squid-cronolog.confd b/squid-cronolog.confd new file mode 100644 index 0000000..6b5a2c1 --- /dev/null +++ b/squid-cronolog.confd @@ -0,0 +1,4 @@ +# Various paths: +PIDFILE="/var/run/squid-cronolog.pid" +FIFO="/var/lib/squid-cronolog.fifo" +LOGS="/var/log/squid/transfer/%Y%m%d.log" diff --git a/squid-cronolog.initd b/squid-cronolog.initd new file mode 100644 index 0000000..484232c --- /dev/null +++ b/squid-cronolog.initd @@ -0,0 +1,22 @@ +#!/sbin/runscript +# Copyright 1999-2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: $ + +depend() { + before squid +} + +start() { + ebegin "Starting squid-cronolog" + start-stop-daemon --start --exec /usr/sbin/squid-cronolog \ + --pidfile "${PIDFILE}" -- "${PIDFILE}" "${FIFO}" "${LOGS}" + eend $? +} + +stop() { + ebegin "Stopping squid-cronolog" + start-stop-daemon --stop --exec /usr/sbin/squid-cronolog \ + --pidfile "${PIDFILE}" + eend $? +} |