Merge branch 'stretch' of https://github.com/bashrc/freedombone
This commit is contained in:
commit
557d3c4cd5
|
@ -2,10 +2,13 @@
|
||||||
|
|
||||||
PROJECT_NAME=freedombone
|
PROJECT_NAME=freedombone
|
||||||
|
|
||||||
ADMIN_USER=$(cat /root/${PROJECT_NAME}-completed.txt | grep 'Admin user' | awk -F ':' '{print $2}')
|
UPTIME=$(cat /proc/uptime | awk -F '.' '{print $1}')
|
||||||
#MY_EMAIL_ADDRESS=${ADMIN_USER}@$(cat /etc/hostname)
|
if [ $UPTIME -gt 120 ]; then
|
||||||
MY_EMAIL_ADDRESS=root@$(cat /etc/hostname)
|
ADMIN_USER=$(cat /root/${PROJECT_NAME}-completed.txt | grep 'Admin user' | awk -F ':' '{print $2}')
|
||||||
echo "USB device connected on ${DEVPATH}" | mail -s "${PROJECT_NAME} USB canary" ${MY_EMAIL_ADDRESS}
|
#MY_EMAIL_ADDRESS=${ADMIN_USER}@$(cat /etc/hostname)
|
||||||
echo "${ACTION}" > /tmp/usb-canary
|
MY_EMAIL_ADDRESS=root@$(cat /etc/hostname)
|
||||||
echo "${MY_EMAIL_ADDRESS}" >> /tmp/usb-canary
|
echo "USB device connected on ${DEVPATH}" | mail -s "${PROJECT_NAME} USB canary" ${MY_EMAIL_ADDRESS}
|
||||||
echo "$(date)" >> /tmp/usb-canary
|
echo "${ACTION}" > /tmp/usb-canary
|
||||||
|
echo "${MY_EMAIL_ADDRESS}" >> /tmp/usb-canary
|
||||||
|
echo "$(date)" >> /tmp/usb-canary
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in New Issue