Bläddra i källkod

Return to using admin user for the usb canary

Bob Mottram 7 år sedan
förälder
incheckning
d128c66ff8
1 ändrade filer med 1 tillägg och 2 borttagningar
  1. 1
    2
      src/freedombone-usb-canary

+ 1
- 2
src/freedombone-usb-canary Visa fil

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