Merge branch 'master' of git@github.com:webmin/webmin

This commit is contained in:
Jamie Cameron
2017-12-26 14:22:15 -08:00
5 changed files with 38 additions and 14 deletions
+1
View File
@@ -11,6 +11,7 @@ hourly_only=Only allow jobs to be at most hourly?,1,0-No,1-Yes
add_file=Add new jobs to file,3,User's regular crontab file
line2=System configuration,11
cron_dir=Crontab Directory,0
cron_crontab=System has <tt>crontab</tt> command availible?,1,0-No&#44; webmin processes user files itself,1-Yes&#44; use following crontab commands for users:
cron_get_command=Command to read a user's cron job,0
cron_edit_command=Command to edit a user's cron job,0
cron_copy_command=Command to accept a user's cron job on stdin,0
+1
View File
@@ -11,6 +11,7 @@ hourly_only=Cronjobs auf 1x pro Stunde begrenzen?,1,0-Nein,1-Ja
add_file=F&#252;gt neue Jobs zu Datei hinzu,3,Regul&#228;re crontab-Datei
line2=Systemkonfiguration,11
cron_dir=Crontab-Verzeichnis,0
cron_crontab=Befehl <tt>crontab</tt> ist im Sytem verf&uuml;gbar?,1,0-Nein&#44; Webmin bearbeitet Benutzer Dateien selbst,1-Ja&#44; nutze folgende Befehle f&uuml;r Benutzer:
cron_get_command=Befehl zum Lesen der Cron-Auftr&#228;ge eines Benutzers,0
cron_edit_command=Befehl zum Bearbeiten der Cron-Auftr&#228;ge eines Benutzers,0
cron_copy_command=Befehl zum Akzeptieren eines Cron-Auftrags eines Benutzers auf stdin,0
+33 -13
View File
@@ -281,7 +281,8 @@ else {
$_[0]->{'type'} != 3);
push(@c, $_[0]->{'command'});
}
return join(" ", @c);
# fix: some older/embedded crond needs tab instead of spaces
return join("\t", @c);
}
=head2 copy_cron_temp(&job)
@@ -489,7 +490,13 @@ local($pwd);
if (&read_file_contents($cron_temp_file) =~ /\S/) {
local $temp = &transname();
local $rv;
if ($config{'cron_edit_command'}) {
if (!$config{'cron_crontab'}) {
# we have no crontab command
# emulate by copy back to user file
$rv = system("cat $cron_temp_file".
" >$config{'cron_dir'}/$_[0] 2>/dev/null");
} elsif ($config{'cron_edit_command'}) {
# fake being an editor
# XXX does not work in translated command mode!
local $notemp = &transname();
@@ -515,8 +522,8 @@ if (&read_file_contents($cron_temp_file) =~ /\S/) {
}
unlink($notemp);
chdir($oldpwd);
}
else {
} else {
# use the cron copy command
if ($single_user) {
$rv = &execute_command(
@@ -528,7 +535,7 @@ if (&read_file_contents($cron_temp_file) =~ /\S/) {
&user_sub($config{'cron_copy_command'}, $_[0]),
$cron_temp_file, $temp, $temp);
}
}
}
local $out = &read_file_contents($temp);
unlink($temp);
if ($rv || $out =~ /error/i) {
@@ -538,14 +545,22 @@ if (&read_file_contents($cron_temp_file) =~ /\S/) {
}
else {
# No more cron jobs left, so just delete
if ($single_user) {
&execute_command($config{'cron_user_delete_command'});
}
else {
&execute_command(&user_sub(
$config{'cron_delete_command'}, $_[0]));
if (!$config{'cron_crontab'}) {
# we have no crontab command
# emulate by deleting user crontab
&unlink_logged("$config{'cron_dir'}/$_[0]");
} else {
if ($single_user) {
&execute_command($config{'cron_user_delete_command'});
}
else {
&execute_command(&user_sub(
$config{'cron_delete_command'}, $_[0]));
}
}
}
if (!$config{'cron_crontab'}) { &kill_byname("crond", "SIGHUP"); } # to reload config
unlink($cron_temp_file);
}
@@ -1508,14 +1523,19 @@ sub check_cron_config
if ($config{'single_file'} && !-r $config{'single_file'}) {
return &text('index_esingle', "<tt>$config{'single_file'}</tt>");
}
if ($config{'cron_get_command'} =~ /^(\S+)/ && !&has_command("$1")) {
if (!$config{'cron_crontab'} && $config{'cron_get_command'} =~ /^(\S+)/ && !&has_command("$1")) {
return &text('index_ecmd', "<tt>$1</tt>");
}
# Check for directory
local $fcron = ($config{'cron_dir'} =~ /\/fcron$/);
if (!$single_user && !$config{'single_file'} &&
!$fcron && !-d $config{'cron_dir'}) {
return &text('index_ecrondir', "<tt>$config{'cron_dir'}</tt>");
if (!$in{'create_dir'}) {
return &text('index_ecrondir', "<tt>$config{'cron_dir'}</tt>").
"<p><a href=\"index.cgi?create_dir=yes\">".&text('index_ecrondir_create' ,"<tt>$config{'cron_dir'}</tt>")."</a></p>";
} else {
&make_dir($config{'cron_dir'}, 0755);
}
}
return undef;
}
+2 -1
View File
@@ -87,7 +87,8 @@ index_disable=Deaktiviere ausgew&#228;hlte Auftr&#228;ge
index_ecmd=Das Kommando $1 um Cron Benutzer Konfigurationen zu bearbeiten wurde nicht gefunden. Vielleicht ist Cron nicht auf Ihrem System installiert?
index_econfigcheck=Cron Auftr&#228;ge k&#246;nnen auf Ihrem System nicht gesteuert werden, weil die Modul-Konfiguration nicht g&#252;ltig ist.
index_ecreate=Eine neue Umgebungsvariable erzeugen.
index_ecrondir=Das Cron Auftr&#228;ge Verzeichnis existiert nicht. Vielleicht ist die Modul-Konfiguration falsch oder Cron ist nicht installiert?
index_ecrondir=Das Cron Auftr&auml;ge Verzeichnis $1 existiert nicht. Vielleicht ist die Modul-Konfiguration falsch oder Cron ist nicht installiert?
index_ecrondir_create=Versuchen Verzeichnis $1 zu erstellen?
index_enable=Aktiviere ausgew&#228;hlte Auftr&#228;ge
index_env=Umgebungsvariable
index_esearch=Keine Auftr&#228;ge f&#252;r Ihre Suche nach $1 gefunden.
+1
View File
@@ -18,6 +18,7 @@ index_run=Running?
index_ecmd=The command $1 for managing user Cron configurations was not found. Maybe Cron is not installed on this system?
index_esingle=The file $1 listing Cron jobs does not exist. Maybe Cron is not installed on this system?
index_ecrondir=The Cron jobs directory $1 does not exist. Maybe the module's configuration is incorrect, or Cron is not installed?
index_ecrondir_create=Try to create jobs directory $1 ?
index_delete=Delete Selected Jobs
index_disable=Disable Selected Jobs
index_enable=Enable Selected Jobs