* Created a dedicated loop for processes that need to run each time tools/scancore-daemon loops.

Signed-off-by: Digimer <digimer@alteeve.ca>
main
Digimer 7 years ago
parent 886331c756
commit eed06bdb22
  1. 17
      tools/scancore-daemon

@ -34,12 +34,12 @@ run_once($an);
# These are the things we always want running.
while(1)
{
update_state_file($an);
# Loop and sleep for 2s.
keep_running($an);
sleep 2;
}
exit(0);
$an->nice_exit({code => 0});
#############################################################################################################
# Functions #
@ -60,6 +60,17 @@ sub run_once
return(0);
}
# These are tools that need to keep running.
sub keep_running
{
my ($an) = @_;
# Update hardware state files.
update_state_file($an);
return(0);
}
# This calls 'scancore-update-states' which will scan the local machine's state (hardware and software) and
# record write it out to an HTML file
sub update_state_file

Loading…
Cancel
Save