mirror of
https://github.com/webmin/webmin.git
synced 2025-08-16 14:51:18 +00:00
Don't run post-backup command if none
This commit is contained in:
@ -10,7 +10,7 @@ $backup = &get_backup($ARGV[0]);
|
||||
$backup || die "Failed to find backup $ARGV[0]";
|
||||
|
||||
# Run the pre-backup command, if any
|
||||
if ($backup->{'pre'}) {
|
||||
if ($backup->{'pre'} =~ /\S/) {
|
||||
$preout = &backquote_command("($backup->{'pre'}) 2>&1 </dev/null");
|
||||
$premsg = &text('email_pre', $backup->{'pre'})."\n".
|
||||
$preout."\n";
|
||||
@ -28,7 +28,7 @@ if (!$err) {
|
||||
}
|
||||
|
||||
# Run the post-backup command, if any
|
||||
if (!$err) {
|
||||
if (!$err && $backup->{'post'} =~ /\S/) {
|
||||
$postout = &backquote_command("($backup->{'post'}) 2>&1 </dev/null");
|
||||
$postmsg = "\n".
|
||||
&text('email_post', $backup->{'post'})."\n".
|
||||
|
Reference in New Issue
Block a user