I want to write a little bash script which checks if an internet Connection is established and then starts the ntp-client.
If there is no connection it should wait about 25 s and try again.
At the Moment it looks like this:
Code: Select all
if ping -c1 www.google.de | grep "1 received";
then /etc/init.d/ntp-client start;
else /home/hannes/Connections/./ntp.sh;
fiI'm looking for something like that:
Code: Select all
if ping -c1 www.google.de | grep "1 received";
then /etc/init.d/ntp-client start;
else "wait for 25 seconds and execute /home/hannes/Connections/./ntp.sh again";
fi

