Initial incremental port from legacy EmComm Tools project

This commit is contained in:
ham
2024-03-20 04:22:54 -07:00
parent 4c1b86a1b2
commit f7f27a008f
22 changed files with 345 additions and 0 deletions
+27
View File
@@ -0,0 +1,27 @@
#!/usr/bin/bash
#
# Author : Gaston Gonzalez
# Date : 16 March 2024
# Purpose : Log message to standard out and log file
if [ ! -e $ET_TEMP_DIR ]; then
mkdir $ET_TEMP_DIR
chmod 755 $ET_TEMP_DIR
fi
if [ ! -e $ET_LOG_FILE ]; then
touch $ET_LOG_FILE
chmod 666 $ET_LOG_FILE
fi
if [ $# -lt 1 ]; then
echo "Usage $(basename $0) <msg>"
echo ""
echo "All messages written to: ${ET_LOG_FILE}"
exit -1
fi
TIMESTAMP=`date "+%Y-%m-%d %H:%M:%S"`
echo $@
echo "$TIMESTAMP $@" >> ${ET_LOG_FILE}