mirror of
https://github.com/webmin/webmin.git
synced 2025-07-21 23:40:34 +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
|
||||
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";
|
||||
exit;
|
||||
}
|
||||
open(PID, ">$pid_file");
|
||||
print PID $$,"\n";
|
||||
close(PID);
|
||||
open(my $pid, ">$pid_file");
|
||||
print $pid $$,"\n";
|
||||
close($pid);
|
||||
|
||||
# Get the current time
|
||||
$time_now = time();
|
||||
@time_now = localtime($time_now);
|
||||
@hours = ( );
|
||||
|
||||
# Pre-process command
|
||||
&pre_process();
|
||||
|
||||
# Scan the entries in the log file
|
||||
&pre_process();
|
||||
open(LOG, "<".$bandwidth_log);
|
||||
|
Reference in New Issue
Block a user