mirror of
https://github.com/webmin/webmin.git
synced 2025-08-17 19:06:28 +00:00
Finished off support for stopping and starting atd
This commit is contained in:
@ -156,7 +156,12 @@ if ($init) {
|
||||
}
|
||||
|
||||
# Start at boot?
|
||||
# XXX
|
||||
my $atboot = &init::action_status($init);
|
||||
print &ui_buttons_row("bootup.cgi", $text{'index_boot'},
|
||||
$text{'index_bootdesc'}, undef,
|
||||
&ui_radio("boot", $atboot == 2 ? 1 : 0,
|
||||
[ [ 1, $text{'yes'} ],
|
||||
[ 0, $text{'no'} ] ]));
|
||||
|
||||
print &ui_buttons_end();
|
||||
}
|
||||
|
10
at/lang/en
10
at/lang/en
@ -24,6 +24,8 @@ index_stop=Stop Scheduled Commands Server
|
||||
index_stopdesc=Shut down the <tt>atd</tt> background server process that runs scheduled commands. This will prevent commands from executing at their specified times.
|
||||
index_start=Start Scheduled Commands Server
|
||||
index_startdesc=Start up the <tt>atd</tt> background server process that runs scheduled commands. This is required for commands to execute at their specified times.
|
||||
index_boot=Start Server At Boot?
|
||||
index_bootdesc=Change this setting to enable or disable starting the scheduled commands server at system boot time.
|
||||
|
||||
edit_title=Scheduled Command
|
||||
edit_cmd=Full script to execute
|
||||
@ -70,4 +72,12 @@ 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
|
||||
log_stop=Stopped scheduled commands server
|
||||
log_start=Started scheduled commands server
|
||||
log_bootup=Enabled scheduled commands server at boot
|
||||
log_bootdown=Disabled scheduled commands server at boot
|
||||
|
||||
stop_err=Failed to stop server
|
||||
start_err=Failed to start server
|
||||
|
||||
__norefs=1
|
||||
|
@ -18,11 +18,8 @@ if ($type eq "job") {
|
||||
elsif ($type eq "jobs") {
|
||||
return &text('log_'.$action.'_jobs', $object);
|
||||
}
|
||||
elsif ($action eq 'allow') {
|
||||
return $text{'log_allow'};
|
||||
}
|
||||
else {
|
||||
return undef;
|
||||
return $text{'log_'.$action};
|
||||
}
|
||||
}
|
||||
|
||||
|
13
at/start.cgi
Normal file
13
at/start.cgi
Normal file
@ -0,0 +1,13 @@
|
||||
#!/usr/local/bin/perl
|
||||
# Start the atd server
|
||||
|
||||
require './at-lib.pl';
|
||||
&error_setup($text{'start_err'});
|
||||
&foreign_require("init");
|
||||
my $init = &get_init_name();
|
||||
my ($ok, $err) = &init::start_action($init);
|
||||
&error($err) if (!$ok);
|
||||
&webmin_log("start");
|
||||
&redirect("");
|
||||
|
||||
|
13
at/stop.cgi
Normal file
13
at/stop.cgi
Normal file
@ -0,0 +1,13 @@
|
||||
#!/usr/local/bin/perl
|
||||
# Stop the atd server
|
||||
|
||||
require './at-lib.pl';
|
||||
&error_setup($text{'stop_err'});
|
||||
&foreign_require("init");
|
||||
my $init = &get_init_name();
|
||||
my ($ok, $err) = &init::stop_action($init);
|
||||
&error($err) if (!$ok);
|
||||
&webmin_log("stop");
|
||||
&redirect("");
|
||||
|
||||
|
Reference in New Issue
Block a user