All pastes #384028 Raw Edit

Something

public text v1 · immutable
·published 2007-03-06 19:51 UTC
rendered paste body
#!/usr/bin/perl -w

my $load = `uptime`;
$load =~ /load\ average\:\ (\d+)\./;
$load = $1;
if($load >= 10){
        print "Restarting apache\n";
        system("/usr/bin/apachectl stop");
        sleep(20);
        system("/usr/bin/apachectl start");
}