diff options
author | Christian Hesse <mail@eworm.de> | 2023-08-24 15:49:41 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2023-08-29 08:58:50 +0200 |
commit | 1dd1c5b03c73034aec739c7ca54c6372107969f6 (patch) | |
tree | ddbf7308e8f243c2f4430605fe99699d39fdf9b2 /backup-upload.rsc | |
parent | 16844b935af98eaabf6db1db96a88ff39819a3df (diff) |
backup-upload: write config file directlyrouteros-7.9beta4-7
This functionality was added in RouterOS 7.9beta4...
Diffstat (limited to 'backup-upload.rsc')
-rw-r--r-- | backup-upload.rsc | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/backup-upload.rsc b/backup-upload.rsc index 1ec61a5..35b9b53 100644 --- a/backup-upload.rsc +++ b/backup-upload.rsc @@ -100,13 +100,13 @@ $WaitFullyConnected; # global-config-overlay :if ($BackupSendGlobalConfig = true) do={ - :execute script={ :put [ /system/script/get global-config-overlay source ]; } \ - file=($FilePath . ".conf"); - $WaitForFile ($FilePath . ".conf.txt"); + :local Config [ /system/script/get global-config-overlay source ]; + /file/add name=($FilePath . ".conf") contents=$Config; + $WaitForFile ($FilePath . ".conf"); :do { /tool/fetch upload=yes url=($BackupUploadUrl . "/" . $FileName . ".conf") \ - user=$BackupUploadUser password=$BackupUploadPass src-path=($FilePath . ".conf.txt"); + user=$BackupUploadUser password=$BackupUploadPass src-path=($FilePath . ".conf"); :set ConfigFile ($FileName . ".conf"); } on-error={ $LogPrintExit2 error $0 ("Uploading global-config-overlay failed!") false; @@ -114,7 +114,7 @@ $WaitFullyConnected; :set Failed 1; } - /file/remove ($FilePath . ".conf.txt"); + /file/remove ($FilePath . ".conf"); } $SendNotification2 ({ origin=$0; \ |