| Server IP : 101.53.144.229 / Your IP : 216.73.216.181 Web Server : Apache System : Linux host.gdigitalindia.in 3.10.0-1160.119.1.el7.x86_64 #1 SMP Tue Jun 4 14:43:51 UTC 2024 x86_64 User : digitalshiksha ( 1179) PHP Version : 5.6.40 Disable Function : eval,show_source,system,shell_exec,escapeshellarg,escapeshellcmd,proc_close,proc_open,ini_alter,dl,show_source,curl_multi_exechellcmd, ini_restore,apache_get_modules,get_cfg_var,passthru, exec ,proc_get_status,fpassthru,c999_buff_prepare,c999_sess_put,c99_buff_prepare,c99_sess_put,proc_close,ini_alter,dl,symlink,link,proc_close,ini_alter,dl,symlink,link,mail MySQL : ON | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /usr/libexec/ |
Upload File : |
#!/bin/bash
ntpconf=/etc/ntp.conf
ntpstep=/etc/ntp/step-tickers
[ "$EUID" != "0" ] && exit 4
[ -x /usr/sbin/ntpdate ] || exit 5
[ -f /etc/sysconfig/ntpdate ] || exit 6
. /etc/sysconfig/ntpdate
[ -f $ntpstep ] && tickers=$(sed 's/#.*//' $ntpstep) || tickers=
if ! echo "$tickers" | grep -qi '[a-z0-9]' && [ -f $ntpconf ]; then
# the step-tickers file doesn't specify a server,
# use servers from ntp.conf instead
tickers=$(awk '$1=="peer"||$1=="server"{print $2}' $ntpconf | \
grep -Ev '127\.127\.[0-9]+\.[0-9]+')
fi
if ! echo "$tickers" | grep -qi '[a-z0-9]'; then
echo "NTP server not specified in $ntpstep or $ntpconf"
exit 6
fi
/usr/sbin/ntpdate -U ntp -s -b $OPTIONS $tickers &> /dev/null
RETVAL=$?
[ $RETVAL -eq 0 ] && [ "$SYNC_HWCLOCK" = "yes" ] && /sbin/hwclock --systohc
exit $RETVAL