mirror of
https://github.com/webmin/webmin.git
synced 2026-08-06 07:50:40 +01:00
Fixed action logging messages
This commit is contained in:
Binary file not shown.
|
Before Width: | Height: | Size: 0 B After Width: | Height: | Size: 424 B |
@@ -118,8 +118,12 @@ log_rename=Renamed action $1 to $2
|
||||
log_modify=Modified action $1
|
||||
log_create=Created action $1
|
||||
log_delete=Deleted action $1
|
||||
log_start=Started bootup action $1
|
||||
log_stop=Stopped shutdown action $1
|
||||
log_start=Started action $1
|
||||
log_stop=Stopped action $1
|
||||
log_restart=Restarted action $1
|
||||
log_condrestart=Conditionally restarted action $1
|
||||
log_reload=Reloaded action $1
|
||||
log_status=Fetched status of action $1
|
||||
log_reboot=Rebooted system
|
||||
log_shutdown=Shutdown system
|
||||
log_local=Modified bootup script
|
||||
|
||||
@@ -23,11 +23,8 @@ elsif ($action eq 'create') {
|
||||
elsif ($action eq 'delete') {
|
||||
return &text('log_delete', "<tt>$object</tt>");
|
||||
}
|
||||
elsif ($action eq 'start') {
|
||||
return &text('log_start', "<tt>$object</tt>");
|
||||
}
|
||||
elsif ($action eq 'stop') {
|
||||
return &text('log_stop', "<tt>$object</tt>");
|
||||
elsif ($type eq 'action') {
|
||||
return &text('log_'.$action, "<tt>$object</tt>");
|
||||
}
|
||||
elsif ($action eq 'reboot') {
|
||||
return $text{'log_reboot'};
|
||||
|
||||
@@ -10,30 +10,14 @@ $access{'bootup'} || &error($text{'ss_ecannot'});
|
||||
# Work out the correct command, and show header
|
||||
$| = 1;
|
||||
$theme_no_header = 1;
|
||||
if (defined($in{'start'})) {
|
||||
&ui_print_header(undef, $text{'ss_start'}, "");
|
||||
$cmd = "$in{'file'} start";
|
||||
}
|
||||
elsif (defined($in{'restart'})) {
|
||||
&ui_print_header(undef, $text{'ss_restart'}, "");
|
||||
$cmd = "$in{'file'} restart";
|
||||
}
|
||||
elsif (defined($in{'condrestart'})) {
|
||||
&ui_print_header(undef, $text{'ss_restart'}, "");
|
||||
$cmd = "$in{'file'} condrestart";
|
||||
}
|
||||
elsif (defined($in{'reload'})) {
|
||||
&ui_print_header(undef, $text{'ss_reload'}, "");
|
||||
$cmd = "$in{'file'} reload";
|
||||
}
|
||||
elsif (defined($in{'status'})) {
|
||||
&ui_print_header(undef, $text{'ss_status'}, "");
|
||||
$cmd = "$in{'file'} status";
|
||||
}
|
||||
else {
|
||||
&ui_print_header(undef, $text{'ss_stop'}, "");
|
||||
$cmd = "$in{'file'} stop";
|
||||
foreach $a ('start', 'restart', 'condrestart', 'reload', 'status', 'stop') {
|
||||
if (defined($in{$a})) {
|
||||
$action = $a;
|
||||
}
|
||||
}
|
||||
$action ||= 'stop';
|
||||
&ui_print_header(undef, $text{'ss_'.$action}, "");
|
||||
$cmd = $in{'file'}." ".$action;
|
||||
|
||||
# In case the action was Webmin
|
||||
$SIG{'TERM'} = 'IGNORE';
|
||||
@@ -43,7 +27,7 @@ print &text('ss_exec', "<tt>$cmd</tt>"),"<p>\n";
|
||||
print "<pre>";
|
||||
&foreign_call("proc", "safe_process_exec_logged", $cmd, 0, 0, STDOUT, undef, 1);
|
||||
print "</pre>\n";
|
||||
&webmin_log($in{'start'} ? 'start' : 'stop', 'action', $in{'name'});
|
||||
&webmin_log($action, 'action', $in{'name'});
|
||||
|
||||
&ui_print_footer($in{'back'}, $text{'edit_return'});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user