Skip to content

Instantly share code, notes, and snippets.

@DeviousPenguin
DeviousPenguin / log_monitor.sh
Last active August 9, 2019 11:51
# Log Monitor - Used to monitor the size of a logfile
# Log Monitor - Used to monitor the size of a logfile
# Will truncate log file if it gets too large
# Start of script
# Set max size of logfile here, in bytes. Default = 1 Megabyte
MAXSIZE="1048576"
# Delete this file if you want script to stop running
RUNFILE="/tmp/log_monitor"
touch "$RUNFILE"