aboutsummaryrefslogtreecommitdiffstats
path: root/main/mini_httpd/mini_httpd.logrotate
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2009-09-03 17:30:54 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-09-03 17:31:40 +0000
commit5e9ddf38f85f18bb4cf62baf88a61af88fd8489b (patch)
tree14bbe9149b420939be172ce54f1800847fb78d29 /main/mini_httpd/mini_httpd.logrotate
parentd28f3110fd6a9ce353e4921b2d8dc4107cba095a (diff)
downloadaports-5e9ddf38f85f18bb4cf62baf88a61af88fd8489b.tar.gz
aports-5e9ddf38f85f18bb4cf62baf88a61af88fd8489b.tar.bz2
aports-5e9ddf38f85f18bb4cf62baf88a61af88fd8489b.tar.xz
main/mini_httpd: added logrotate script
moved default logfile and pid fiels to /var/{run,log}/mini_httpd/ fixes #80
Diffstat (limited to 'main/mini_httpd/mini_httpd.logrotate')
-rw-r--r--main/mini_httpd/mini_httpd.logrotate16
1 files changed, 16 insertions, 0 deletions
diff --git a/main/mini_httpd/mini_httpd.logrotate b/main/mini_httpd/mini_httpd.logrotate
new file mode 100644
index 0000000000..bbd448b80a
--- /dev/null
+++ b/main/mini_httpd/mini_httpd.logrotate
@@ -0,0 +1,16 @@
+/var/log/mini_httpd/*.log {
+ weekly
+ missingok
+ copytruncate
+ rotate 7
+ compress
+ notifempty
+ sharedscripts
+ postrotate
+ for i in /var/run/mini_httpd*.pid /var/run/mini_httpd/*.pid; do \
+ if [ -f "$i" ]; then \
+ /etc/init.d/$(basename $i .pid) restart > /dev/null 2>&1 || true ; \
+ fi; \
+ done;
+ endscript
+}