Hello. I have made a shell script wich checks if an klient machine respondes to
ping or not. If not it writes a error message to a file. Se script below :
#!/bin/bash
if ! ping -c1 ipaddress_to_klient ; then
echo "Lost contact :" date >> /home/user/ressurser/admin/solcelle/error.txt <<EOF
EOF
fi
This works ok. But when I try to run it though crontab it produces the error
message even if the klient machine respondes to ping. Blow is my crontab file :
- /home/user/ressurser/admin/solcelle/check_client.sh
What can be wrong ?