Skip to content

Commit

Permalink
Prevent concurrent collectinfo.pl runs
Browse files Browse the repository at this point in the history
  • Loading branch information
jcameron committed Jun 7, 2007
1 parent 1d7dc71 commit 5590580
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion collectinfo.pl
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,15 @@ package virtual_server;
$main::no_acl_check++;
require './virtual-server-lib.pl';

# Make sure we are not already running
if (&test_lock($collected_info_file)) {
print "Already running\n";
exit(0);
}
&lock_file($collected_info_file);

$info = &collect_system_info();
if ($info) {
&save_collected_info($info);
}

&unlock_file($collected_info_file);

0 comments on commit 5590580

Please sign in to comment.