Commit 5324b055 authored by Ivan Malenkov's avatar Ivan Malenkov
Browse files

init

parents
Loading
Loading
Loading
Loading

logrotate.generator.sh

0 → 100644
+6 −0
Original line number Diff line number Diff line
#!/bin/bash

mkdir -p /opt/logz/$1
cp logrotate.tpl $1
sed -i "s|APP|$1|g" $1
mv $1 /opt/logrotate.d/

logrotate.tpl

0 → 100644
+15 −0
Original line number Diff line number Diff line
/opt/APP/logs/application.log {
  daily
  rotate 30
  missingok
  notifempty
  copytruncate
  compress
  delaycompress
  prerotate
    if [ -f "$1.30.gz" ]; then
      cp "$1.30.gz" /opt/logz/APP/
    fi
  endscript
}
 No newline at end of file