17 *	* * *	root	[[ $(ping -c1 8.8.8.8 | tail -n2 | head -n1 | cut -d"," -f2 | cut -d" " -f2) != "1" ]] && { { /etc/init.d/networking restart && /etc/init.d/network-manager restart && curl "https://api.telegram.org/XXX:XXX/sendMessage?chat_id=XXX&text=\%22networking\%20and\%20network-manager\%20restarted\%22" ;} && { wget -O /dev/null -o /dev/null https://nyifiles.pfsense.org/mirror/downloads/pfSense-CE-2.3.5-RELEASE-2g-i386-nanobsd.img.gz && curl "https://api.telegram.org/XXX:XXX/sendMessage?chat_id=XXX&text=\%22wget\%20download\%20OK\%22" || curl "https://api.telegram.org/XXX:XXX/sendMessage?chat_id=XXX&text=\%22wget\%20download\%20KO\%22" ;} ;}

With me! Sing! It's gonna ping! If not it's gonna restart the net! If yes is gonna send you a text! And then is gonna download a file, just to check!

By AnonimaBazhi, 2018-12-04 19:33:23