You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

19 lines
450 B

#!/bin/bash
# command info
if [ "$1" = "-h" ] || [ "$1" = "-help" ]; then
echo "additional systemd services"
echo "blitz.systemd.sh log blockchain STARTED"
echo "blitz.systemd.sh log loghtning STARTED"
exit 1
fi
# check parameter
if [ "${1}" != "log" ]; then
echo "# FAIL: unkown parameter"
fi
# writing log file entry
logFile="/home/admin/systemd.${2}.log"
echo "${3} $(date +%s)" >> ${logFile}
echo "# OK: log '${3}' written to ${logFile}"