diff --git a/Bundler/gunicorn.xml b/Bundler/gunicorn.xml index 0955ec3..ed327f9 100644 --- a/Bundler/gunicorn.xml +++ b/Bundler/gunicorn.xml @@ -1,3 +1,4 @@ + diff --git a/Cfg/etc/logrotate.d/gunicorn/gunicorn b/Cfg/etc/logrotate.d/gunicorn/gunicorn new file mode 100644 index 0000000..4fb1295 --- /dev/null +++ b/Cfg/etc/logrotate.d/gunicorn/gunicorn @@ -0,0 +1,17 @@ +/var/log/gunicorn/*.log { + weekly + missingok + rotate 52 + compress + notifempty + create 0640 www-data adm + sharedscripts + postrotate + if [ -e /var/run/gunicorn ] && [ `ls /var/run/gunicorn/ | wc -l` -ge 1 ]; then + for i in /var/run/gunicorn/*; do + service=`basename $i | sed 's/\.pid//'` + /etc/init.d/gunicorn restart $service >/dev/null + done + fi + endscript +} diff --git a/Cfg/etc/logrotate.d/gunicorn/info.xml b/Cfg/etc/logrotate.d/gunicorn/info.xml new file mode 100644 index 0000000..28fd470 --- /dev/null +++ b/Cfg/etc/logrotate.d/gunicorn/info.xml @@ -0,0 +1,3 @@ + + +