mirror of
https://github.com/thetechprepper/emcomm-tools-os-community.git
synced 2026-09-17 15:41:44 -04:00
Initial incremental port from legacy EmComm Tools project
This commit is contained in:
Executable
+27
@@ -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}
|
||||
Reference in New Issue
Block a user