#!/bin/bash
#set -x 
ntpstat >/dev/null 2>&1
if [ $? -ne 0 ]; then
    echo Restarting ntpd from super user cron > /home/bckp/ntpdrestart.log
    systemctl restart ntpd
    systemctl restart crond
    kill -9 $(ps aux | grep 'backup' | awk '{print $2}')
    kill -9 $(ps aux | grep 'iocl' | awk '{print $2}')
    kill -9 $(ps aux | grep 'pushdata' | awk '{print $2}')
fi

