summaryrefslogtreecommitdiffstats
path: root/main/mini_httpd/mini_httpd.logrotate
diff options
context:
space:
mode:
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 000000000..bbd448b80
--- /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
+}