-
-
Save maxidr/6609248 to your computer and use it in GitHub Desktop.
Log rotate for thin server. You need to locate this files in folder: /etc/logrotate.d/ You can check using: logrotate -d thin
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/opt/mxhero-apps/footers-web/shared/log/*.log { | |
daily | |
missingok | |
rotate 52 | |
compress | |
delaycompress | |
notifempty | |
create 0640 ubuntu ubuntu | |
sharedscripts | |
postrotate | |
if [ -d /etc/logrotate.d/thin-postrotate ]; then \ | |
run-parts /etc/logrotate.d/thin-postrotate; \ | |
fi; \ | |
endscript | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
PIDS=`find /opt/mxhero-apps/footers-web/shared/pids/ -type f | (while read line; do cat $line; echo -n " "; done;)` | |
[ ! -f /opt/mxhero-apps/footers-web/shared/pids/thin.3000.pid ] || kill -USR1 $PIDS |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-d flag checks for the directory existance but thin-postrotate is a file so line 11 should check for a file instead (with -f flag)