Server IP : 195.201.23.43 / Your IP : 3.141.43.16 Web Server : Apache System : Linux webserver2.vercom.be 5.4.0-192-generic #212-Ubuntu SMP Fri Jul 5 09:47:39 UTC 2024 x86_64 User : kdecoratie ( 1041) PHP Version : 7.1.33-63+ubuntu20.04.1+deb.sury.org+1 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals, MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /usr/share/webmin/package-updates/ |
Upload File : |
#!/usr/bin/perl # Save scheduled checking options require './package-updates-lib.pl'; &ReadParse(); &lock_file($module_config_file); $config{'sched_email'} = $in{'email'}; $config{'sched_action'} = $in{'action'}; &save_module_config(); &unlock_file($module_config_file); $oldjob = $job = &find_cron_job(); if ($in{'sched_def'}) { if ($job) { &lock_file(&cron::cron_file($job)); &cron::delete_cron_job($job); &unlock_file(&cron::cron_file($job)); } $msg = $text{'sched_no'}; } else { $job ||= { 'user' => 'root', 'active' => 1, 'command' => $cron_cmd }; $job->{'mins'} = $job->{'hours'} = $job->{'days'} = $job->{'months'} = $job->{'weekdays'} = '*'; if ($in{'sched'} eq 'h') { $job->{'mins'} = int(rand()*60); } elsif ($in{'sched'} eq 'd') { $job->{'mins'} = int(rand()*60); $job->{'hours'} = int(rand()*24); } elsif ($in{'sched'} eq 'w') { $job->{'mins'} = int(rand()*60); $job->{'hours'} = int(rand()*24); $job->{'weekdays'} = int(rand()*7); } &lock_file(&cron::cron_file($job)); if ($oldjob) { &cron::change_cron_job($job); } else { &cron::create_cron_job($job); } &unlock_file(&cron::cron_file($job)); &lock_file($cron_cmd); &cron::create_wrapper($cron_cmd, $module_name, "update.pl"); &unlock_file($cron_cmd); $msg = $text{'sched_yes'}; } # Tell the user &ui_print_header(undef, $text{'sched_title'}, ""); print "$msg<p>\n"; &webmin_log("sched", undef, $in{'sched_def'} ? 0 : 1); &ui_print_footer("index.cgi?mode=$in{'mode'}&search=". &urlize($in{'search'}), $text{'index_return'});Private