Clear collected info when disabling
authorJamie Cameron <jcameron@webmin.com>
Sat, 10 Oct 2009 05:16:14 +0000 (22:16 -0700)
committerJamie Cameron <jcameron@webmin.com>
Sat, 10 Oct 2009 05:16:14 +0000 (22:16 -0700)
webmin/change_status.cgi

index 5eecda0..14499de 100644 (file)
@@ -22,7 +22,12 @@ $system_status::config{'collect_pkgs'} = $in{'pkgs'};
 &save_module_config(\%system_status::config, 'system-status');
 &unlock_file($system_status::module_config_file);
 &system_status::setup_collectinfo_job();
-&system_logged($system_status::systeminfo_cron_cmd);
+if ($in{'interval_def'}) {
+       &unlink_file($system_status::collected_info_file);
+       }
+else {
+       &system_logged($system_status::systeminfo_cron_cmd);
+       }
 
 &webmin_log("status");
 &redirect("");