This file contains hidden or 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
pm2 set pm2-logrotate:max_size 30M | |
pm2 set pm2-logrotate:retain 200 | |
pm2 set pm2-logrotate:compress true | |
pm2 set pm2-logrotate:dateFormat YYYY-MM-DD_HH-mm-ss | |
pm2 set pm2-logrotate:workerInterval 30 | |
pm2 set pm2-logrotate:rotateInterval 0 0 * * * | |
pm2 set pm2-logrotate:rotateModule true |
This file contains hidden or 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
#!/bin/bash | |
# Check if running as root | |
if [ "$EUID" -ne 0 ]; then | |
echo "Please run as root or with sudo" | |
exit 1 | |
fi | |
# Exit on error | |
set -e |
OlderNewer