mirror of
https://github.com/eworm-de/routeros-scripts
synced 2024-05-14 08:04:19 +00:00
backup-upload: get rid of '.txt' file extension
This commit is contained in:
parent
11daef75f0
commit
b75b0bf6be
1 changed files with 4 additions and 4 deletions
|
@ -103,12 +103,12 @@ $WaitFullyConnected;
|
||||||
:if ($BackupSendGlobalConfig = true) do={
|
:if ($BackupSendGlobalConfig = true) do={
|
||||||
# Do *NOT* use '/file/add ...' here, as it is limited to 4095 bytes!
|
# Do *NOT* use '/file/add ...' here, as it is limited to 4095 bytes!
|
||||||
:execute script={ :put [ /system/script/get global-config-overlay source ]; } \
|
:execute script={ :put [ /system/script/get global-config-overlay source ]; } \
|
||||||
file=($FilePath . ".conf");
|
file=($FilePath . ".conf\00");
|
||||||
$WaitForFile ($FilePath . ".conf.txt");
|
$WaitForFile ($FilePath . ".conf");
|
||||||
|
|
||||||
:do {
|
:do {
|
||||||
/tool/fetch upload=yes url=($BackupUploadUrl . "/" . $FileName . ".conf") \
|
/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 [ /file/get ($FilePath . ".conf") ];
|
:set ConfigFile [ /file/get ($FilePath . ".conf") ];
|
||||||
:set ($ConfigFile->"name") ($FileName . ".conf");
|
:set ($ConfigFile->"name") ($FileName . ".conf");
|
||||||
} on-error={
|
} on-error={
|
||||||
|
@ -117,7 +117,7 @@ $WaitFullyConnected;
|
||||||
:set Failed 1;
|
:set Failed 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/file/remove ($FilePath . ".conf.txt");
|
/file/remove ($FilePath . ".conf");
|
||||||
}
|
}
|
||||||
|
|
||||||
:local FileInfo do={
|
:local FileInfo do={
|
||||||
|
|
Loading…
Reference in a new issue