]> git.ipfire.org Git - people/bonnietwin/ipfire-2.x.git/commitdiff
backup: Fork ISO job into the background in CGI script
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 2 Dec 2021 12:37:15 +0000 (12:37 +0000)
committerPeter Müller <peter.mueller@ipfire.org>
Tue, 14 Dec 2021 13:39:26 +0000 (14:39 +0100)
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 <michael.tremer@ipfire.org>
config/backup/backup.pl
html/cgi-bin/backup.cgi

index bed5952def200841fcc574d3fde8126c8b0a1d05..afd8d1663df650aeebafa39147adcc4fd0e30f37 100644 (file)
@@ -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
                        ;;
 
index 84c015314e2a987bb2f550dc97cf8b4a5f5d5051..1b1ccb4a8658b6694a1e0ca6f1a9a1aa2a88c1cf 100644 (file)
@@ -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" )