1
0
mirror of https://github.com/eworm-de/routeros-scripts.git synced 2024-05-11 05:55:19 +00:00

backup-email: write config file directly

This functionality was added in RouterOS 7.9beta4...
This commit is contained in:
Christian Hesse
2023-08-24 15:51:53 +02:00
parent 1dd1c5b03c
commit 3c96db5824

View File

@@ -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