create log dir if needed

This commit is contained in:
Benjamin Bryan
2016-09-11 15:18:13 -07:00
parent 88a779d014
commit 5c2eff6e2f

View File

@@ -5,6 +5,9 @@ source /opt/arm/config
{
echo "Starting Identify Script..." >> $LOG
# Create log dir if needed
mkdir -p $LOGPATH
#Clean up old log files
FILESFOUND=( $(find $LOGPATH -mtime +$LOGLIFE -type f))
echo "Deleting ${#FILESFOUND[@]} old log files:"${FILESFOUND[@]} >> $LOG