---- Changes since 1.390 ----
Converted all user interface code to use the new Webmin UI library.
When editing a job, only the actual command entered is shown by default - the full command can be displayed using a new link.
+---- Changes since 1.490 ----
+Added action logging for scheduled commands created and deleted using this module.
print &text('run_output'),"<p>\n";
@uinfo = getpwnam($job->{'user'});
print "<pre>";
- $got = &proc::safe_process_exec_logged($temp, $uinfo[2], $uinfo[3],
- STDOUT, undef, 1);
+ &additional_log('exec', undef, $job->{'cmd'});
+ $got = &proc::safe_process_exec($temp, $uinfo[2], $uinfo[3],
+ STDOUT, undef, 1);
if (!$got) { print "<i>$text{'run_none'}</i>\n"; }
unlink($temp);
print "</pre>\n";
+ &webmin_log("exec", "job", $job->{'user'}, $job);
&ui_print_footer("", $text{'index_return'});
}
deletes_err=Failed to cancel commands
deletes_enone=None selected
+
+log_allow=Changed allowed users
+log_create_job=Created scheduled command for $1
+log_delete_job=Cancelled scheduled command for $1
+log_exec_job=Executed scheduled command for $1
+log_delete_jobs=Cancelled $1 scheduled commands
--- /dev/null
+# log_parser.pl
+# Functions for parsing this module's logs
+
+do 'at-lib.pl';
+
+# parse_webmin_log(user, script, action, type, object, ¶ms, [long])
+# Converts logged information from this module into human-readable form
+sub parse_webmin_log
+{
+local ($user, $script, $action, $type, $object, $p, $long) = @_;
+if ($type eq "job") {
+ return &text('log_'.$action.'_job',
+ "<tt>".&html_escape($object)."</tt>");
+ }
+elsif ($type eq "jobs") {
+ return &text('log_'.$action.'_jobs', $object);
+ }
+elsif ($action eq 'allow') {
+ return $text{'log_allow'};
+ }
+else {
+ return undef;
+ }
+}
+