MOON
Server: Apache
System: Linux vps.thepromohut.com 2.6.18-398.el5 #1 SMP Tue Sep 16 20:51:48 EDT 2014 i686
User: caretrak (507)
PHP: 5.2.10
Disabled: NONE
Upload Files
File: //proc/self/root/scripts/rdate
#!/usr/local/cpanel/3rdparty/bin/perl

# cpanel - rdate                                  Copyright(c) 2011 cPanel, Inc.
#                                                           All rights Reserved.
# copyright@cpanel.net                                         http://cpanel.net
# This code is subject to the cPanel license. Unauthorized copying is prohibited

use strict;
use Cpanel::LoadFile        ();
use Cpanel::Unix::PID::Tiny ();

my $envtype = Cpanel::LoadFile::loadfile('/var/cpanel/envtype');

# Case 48348 -- Virtual environments cannot set the system time so do nothing.
if ( $envtype =~ m/zzo/ || $envtype =~ m/cpanel-vserver/ ) {
    print "Virtual environment detected - rdate skipped\n";
    exit 0;
}
else {
    my $upid = Cpanel::Unix::PID::Tiny->new();
    my $pid  = $upid->is_pidfile_running('/var/run/ntpd.pid');

    if ($pid) {
        print "The 'ntpd' daemon is running on PID '$pid'. Exiting.\n";
    }
    else {
        system( '/usr/bin/rdate', '-s', 'rdate.cpanel.net' );
    }
}

exit 0;