From 3c96db58246ce85b9796f4322a7ace7687531b55 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 24 Aug 2023 15:51:53 +0200 Subject: backup-email: write config file directly This functionality was added in RouterOS 7.9beta4... --- backup-email.rsc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/backup-email.rsc b/backup-email.rsc index 5eb4fcc..4dd9fcc 100644 --- a/backup-email.rsc +++ b/backup-email.rsc @@ -80,11 +80,11 @@ $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"); - :set ConfigFile ($FileName . ".conf.txt"); - :set Attach ($Attach, ($FilePath . ".conf.txt")); + :local Config [ /system/script/get global-config-overlay source ]; + /file/add name=($FilePath . ".conf") contents=$Config; + $WaitForFile ($FilePath . ".conf"); + :set ConfigFile ($FileName . ".conf"); + :set Attach ($Attach, ($FilePath . ".conf")); } # send email with status and files -- cgit v1.2.3-70-g09d2