From: Michael Tremer Date: Thu, 2 Dec 2021 12:37:15 +0000 (+0000) Subject: backup: Fork ISO job into the background in CGI script X-Git-Tag: v2.27-core163~26^2~10 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=45a5df5a5e220437eca3b9c2743076d727583b67;p=ipfire-2.x.git backup: Fork ISO job into the background in CGI script In order to be able to run the ISO command on command line it is helpful that the script does not go into background halfway through the process. We should rather start it as a background job straight from the CGI script. Signed-off-by: Michael Tremer --- diff --git a/config/backup/backup.pl b/config/backup/backup.pl index bed5952def..afd8d1663d 100644 --- a/config/backup/backup.pl +++ b/config/backup/backup.pl @@ -247,7 +247,7 @@ main() { local filename="/var/ipfire/backup/${NOW}.ipf" if make_backup "${filename}"; then - /usr/local/bin/backupiso "${NOW}" & + /usr/local/bin/backupiso "${NOW}" fi ;; diff --git a/html/cgi-bin/backup.cgi b/html/cgi-bin/backup.cgi index 84c015314e..1b1ccb4a86 100644 --- a/html/cgi-bin/backup.cgi +++ b/html/cgi-bin/backup.cgi @@ -119,7 +119,7 @@ if ( $cgiparams{'ACTION'} eq "backup" ) } elsif ( $cgiparams{'BACKUPLOGS'} eq "exclude" ) { &General::system("/usr/local/bin/backupctrl", "exclude"); } elsif ( $cgiparams{'BACKUPLOGS'} eq "iso" ) { - &General::system("/usr/local/bin/backupctrl", "iso"); + &General::system_background("/usr/local/bin/backupctrl", "iso"); } } if ( $cgiparams{'ACTION'} eq "addonbackup" )