From 420986fdfcaee163da10e5e8c6376b6e178c025c Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Wed, 23 Jun 2021 00:43:42 +0200 Subject: packages-update: use 'provides' to find backup scripts --- cloud-backup | 2 ++ email-backup | 2 ++ packages-update | 2 +- upload-backup | 2 ++ 4 files changed, 7 insertions(+), 1 deletion(-) diff --git a/cloud-backup b/cloud-backup index 5003f8f..3fa0e41 100644 --- a/cloud-backup +++ b/cloud-backup @@ -3,6 +3,8 @@ # Copyright (c) 2013-2021 Christian Hesse # https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md # +# provides: backup-script +# # upload backup to MikroTik cloud # https://git.eworm.de/cgit/routeros-scripts/about/doc/cloud-backup.md diff --git a/email-backup b/email-backup index 5a74220..a819a4a 100644 --- a/email-backup +++ b/email-backup @@ -3,6 +3,8 @@ # Copyright (c) 2013-2021 Christian Hesse # https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md # +# provides: backup-script +# # create and email backup and config file # https://git.eworm.de/cgit/routeros-scripts/about/doc/email-backup.md diff --git a/packages-update b/packages-update index bb138d7..627a7c4 100644 --- a/packages-update +++ b/packages-update @@ -52,7 +52,7 @@ $ScriptLock $0; } } -:foreach Script in=[ / system script find where name~"^(cloud|email|upload)-backup\$" ] do={ +:foreach Script in=[ / system script find where source~"\n# provides: backup-script\n" ] do={ :local ScriptName [ / system script get $Script name ]; :do { $LogPrintExit2 info $0 ("Running backup script " . $ScriptName . " before update.") false; diff --git a/upload-backup b/upload-backup index d79039a..cde847c 100644 --- a/upload-backup +++ b/upload-backup @@ -3,6 +3,8 @@ # Copyright (c) 2013-2021 Christian Hesse # https://git.eworm.de/cgit/routeros-scripts/about/COPYING.md # +# provides: backup-script +# # create and upload backup and config file # https://git.eworm.de/cgit/routeros-scripts/about/doc/upload-backup.md -- cgit v1.2.3-70-g09d2