backup-email: create directory later

This commit is contained in:
Christian Hesse 2022-12-12 15:24:42 +01:00
parent 16bfe4de7e
commit 8b2571dc49

View file

@ -45,10 +45,6 @@ $WaitFullyConnected;
$RandomDelay $BackupRandomDelay;
}
:if ([ $MkDir $0 ] = false) do={
$LogPrintExit2 error $0 ("Failed creating directory!") true;
}
# filename based on identity
:local FileName [ $CharacterReplace ($Identity . "." . $Domain) "." "_" ];
:local FilePath ($0 . "/" . $FileName);
@ -56,6 +52,10 @@ $WaitFullyConnected;
:local ConfigFile "none";
:local Attach ({});
:if ([ $MkDir $0 ] = false) do={
$LogPrintExit2 error $0 ("Failed creating directory!") true;
}
# binary backup
:if ($BackupSendBinary = true) do={
/system/backup/save encryption=aes-sha256 name=$FilePath password=$BackupPassword;