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: //scripts.20110601.041516.15411/quicksecure
#!/usr/bin/perl
# cpanel - quicksecure                            Copyright(c) 2010 cPanel, Inc.
#                                                           All rights Reserved.
# copyright@cpanel.net                                         http://cpanel.net
# This code is subject to the cpanel license. Unauthorized copying is prohibited

BEGIN { unshift @INC, '/usr/local/cpanel'; }

use Cpanel::SafeRun::Simple ();

open( STDERR, ">", "/dev/null" );

#----------------------------------------------------------------------

# List of processes that will be stopped/disable
my @serviceList1 = ( 'portmap', 'identd', 'lpd', 'apmd', 'atd', 'cups', 'innd', 'ypbind', 'nfslock', 'rpcidmapd' );

# List of processes that will not be stopped/disable
# when X-Window related applications are detected.
my @serviceList2 = ( 'gpm', 'pcmcia', 'smb', 'xfs' );

foreach my $serviceName (@serviceList1) {
    Cpanel::SafeRun::Simple::saferun( '/scripts/cpservice', $serviceName, 'disable' );
    Cpanel::SafeRun::Simple::saferun( '/scripts/cpservice', $serviceName, 'stop' );
}

foreach my $serviceName (@serviceList2) {

    if (   -e "/usr/bin/netscape"
        || -e "/usr/bin/mozilla"
        || -e "/usr/X11R6/bin/xscreensaver"
        || -e "/usr/bin/gnome-sessions" ) {
        print "X workstation, skipping " . $serviceName . " disable\n";
    }
    else {
        Cpanel::SafeRun::Simple::saferun( '/scripts/cpservice', $serviceName, 'disable' );
        Cpanel::SafeRun::Simple::saferun( '/scripts/cpservice', $serviceName, 'stop' );
    }
}

#----------------------------------------------------------------------