This commit is contained in:
Bob Mottram 2017-09-22 18:08:36 +01:00
commit 557d3c4cd5
1 changed files with 10 additions and 7 deletions

View File

@ -2,6 +2,8 @@
PROJECT_NAME=freedombone PROJECT_NAME=freedombone
UPTIME=$(cat /proc/uptime | awk -F '.' '{print $1}')
if [ $UPTIME -gt 120 ]; then
ADMIN_USER=$(cat /root/${PROJECT_NAME}-completed.txt | grep 'Admin user' | awk -F ':' '{print $2}') ADMIN_USER=$(cat /root/${PROJECT_NAME}-completed.txt | grep 'Admin user' | awk -F ':' '{print $2}')
#MY_EMAIL_ADDRESS=${ADMIN_USER}@$(cat /etc/hostname) #MY_EMAIL_ADDRESS=${ADMIN_USER}@$(cat /etc/hostname)
MY_EMAIL_ADDRESS=root@$(cat /etc/hostname) MY_EMAIL_ADDRESS=root@$(cat /etc/hostname)
@ -9,3 +11,4 @@ echo "USB device connected on ${DEVPATH}" | mail -s "${PROJECT_NAME} USB canary"
echo "${ACTION}" > /tmp/usb-canary echo "${ACTION}" > /tmp/usb-canary
echo "${MY_EMAIL_ADDRESS}" >> /tmp/usb-canary echo "${MY_EMAIL_ADDRESS}" >> /tmp/usb-canary
echo "$(date)" >> /tmp/usb-canary echo "$(date)" >> /tmp/usb-canary
fi