remove script 'remove-packages'

Use script 'capsman-download-packages' to download and
cleanup packages...
This commit is contained in:
Christian Hesse 2018-12-27 21:50:17 +01:00
parent 1131d8ee41
commit 58d105da00

View file

@ -1,19 +0,0 @@
#!rsc
# RouterOS script: remove-packages
# Copyright (c) 2013-2018 Christian Hesse <mail@eworm.de>
#
# remove packages (*.npk) not matching installed version
:if ([ /system resource get uptime ] < 1m) do={ :delay 1m; }
:local version [ / system package update get installed-version ];
:foreach package in=[ / file find type="package" ] do={
:local filename [ / file get $package name ];
:if ($filename~$version) do={
:log debug ("Package file " . $filename . " is up-to-date.");
} else={
:log debug ("Removing old packge file: " . $filename);
/ file remove $package;
}
}