Revize 1956
Přidáno uživatelem Michal Kliment před více než 11 roky(ů)
freenetis/branches/1.1/application/vendors/dhcp/freenetis-dhcp-sync.rsc | ||
---|---|---|
# Author: Michal Kliment #
|
||
# Description: This script regenerate DHCP server from FreenetIS #
|
||
# #
|
||
# Version: 0.1.0 #
|
||
# Version: 0.1.1 #
|
||
# #
|
||
#######################################################################################################
|
||
|
||
... | ... | |
# ID of device from FreenetIS
|
||
:global DEVICEID 0
|
||
|
||
# Forced download
|
||
:global FORCED 0
|
||
|
||
######################################## SCRIPT - DO NOT CHANGE! ######################################
|
||
|
||
# First run with forced download
|
||
:if ([:len [/file find name="dhcp.rsc"]] = 0) do={
|
||
:set FORCED 1
|
||
}
|
||
|
||
# Download script from FreenetIS
|
||
/tool fetch url="$PATHFN/en/devices/export/$DEVICEID/mikrotik-ip-dhcp-server/text" dst-path="dhcp.rsc"
|
||
/tool fetch url="$PATHFN/en/devices/export/$DEVICEID/mikrotik-ip-dhcp-server/text/$FORCED" dst-path="dhcp.rsc"
|
||
|
||
# Waiting to end of downloading
|
||
:delay 3
|
||
|
||
# Run script
|
||
import dhcp.rsc
|
||
|
||
# Cleaning
|
||
/file remove [/file find name="dhcp.rsc"]
|
||
import dhcp.rsc
|
Také k dispozici: Unified diff
Opravy:
- fixes #573: Skript pro Mikrotik - prvni spusteni