Make usermin.pl cron more aggressive
authorJamie Cameron <jcameron@webmin.com>
Wed, 19 Jan 2011 18:24:00 +0000 (10:24 -0800)
committerJamie Cameron <jcameron@webmin.com>
Wed, 19 Jan 2011 18:24:00 +0000 (10:24 -0800)
usermin/uninstall.pl

index efcf0a4..c2718d1 100755 (executable)
@@ -5,14 +5,12 @@ require 'usermin-lib.pl';
 
 sub module_uninstall
 {
-if ($config{'update'}) {
-       &foreign_require("cron", "cron-lib.pl");
-       $cron_cmd = "$module_config_directory/update.pl";
-       foreach $j (&cron::list_cron_jobs()) {
-               if ($j->{'user'} eq 'root' &&
-                   $j->{'command'} eq $cron_cmd) {
-                       &cron::delete_cron_job($j);
-                       }
+&foreign_require("cron", "cron-lib.pl");
+my $cron_cmd = "$module_config_directory/update.pl";
+foreach my $j (&cron::list_cron_jobs()) {
+       if ($j->{'user'} eq 'root' &&
+           $j->{'command'} eq $cron_cmd) {
+               &cron::delete_cron_job($j);
                }
        }
 }