:local FileName "ban.rsc";
:do {
:do {
/file remove "//ban.rsc";
} on-error={}
:put "Downloading /ban.rsc…";
:log warning "Downloading /ads.rsc…";
:do {
/tool fetch url="http://xxx/tools/ban.rsc" dst-path="ban.rsc"
} on-error={
:put "Error. Download /ban.rsc failed";
:log error "Error. Download /ban.rsc failed";
:return 0;
}
/ip firewall address-list remove [/ip firewall address-list find list=firehost_list]
:put "Importing /ban.rsc…";
:log warning "Importing /ban.rsc…";
:do {
/import "//ban.rsc";
} on-error={
:put "Import /ban.rsc failed. unknown error.";
:log error "Import /ban.rsc failed. unknown error.";
}
:put "Update ban-block address-list completed.";
:log warning "Update Firehost_list address-list completed.";
}