Site icon Learning & Doing

membuat script auto restart DNS

#!/bin/bash

nslookup google.com localhost > /dev/null

if [ $? -eq 1 ]
then
/etc/init.d/pdns stop
echo $(date) >> /tmp/monitor.log
fi

ket :

Exit mobile version