So I've been tasked with creating a shell script to run in a cron every few minutes to check duplex settings on my eth0 nic card. I would like for the server to send a wall message to whoever is on the console or in a terminal session. Below is what I have so far.
0,10,20,30,40,50 * * * * /home/acc4000d/test10
I have it in my root's cron so that wall will run. Can someone tell me what I'm missing for the wall to actually happen?
Script looks like this;
#!/bin/bash
DUPLEX=$(ethtool eth0 | sed -n 's/Duplex:\(.*\)/\1/p')
if [ $DUPLEX = Half ]
then /usr/bin/wall duplex_error
fi
annnnd the wall message file is called "duplex_error"