mirror of
https://github.com/webmin/webmin.git
synced 2025-08-15 21:20:10 +00:00
Fix code readability and scoping
This commit is contained in:
@ -20,18 +20,22 @@ if (!$config{'firewall_system'}) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
# See if this process is already running
|
# See if this process is already running
|
||||||
if ($pid = &check_pid_file($pid_file)) {
|
if (my $pid = &check_pid_file($pid_file)) {
|
||||||
print STDERR "rotate.pl process $pid is already running\n";
|
print STDERR "rotate.pl process $pid is already running\n";
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
open(PID, ">$pid_file");
|
open(my $pid, ">$pid_file");
|
||||||
print PID $$,"\n";
|
print $pid $$,"\n";
|
||||||
close(PID);
|
close($pid);
|
||||||
|
|
||||||
|
# Get the current time
|
||||||
$time_now = time();
|
$time_now = time();
|
||||||
@time_now = localtime($time_now);
|
@time_now = localtime($time_now);
|
||||||
@hours = ( );
|
@hours = ( );
|
||||||
|
|
||||||
|
# Pre-process command
|
||||||
|
&pre_process();
|
||||||
|
|
||||||
# Scan the entries in the log file
|
# Scan the entries in the log file
|
||||||
&pre_process();
|
&pre_process();
|
||||||
open(LOG, "<".$bandwidth_log);
|
open(LOG, "<".$bandwidth_log);
|
||||||
|
Reference in New Issue
Block a user