Posledni verze skriptu co nefunguje. Fakt nevim kde dělam chybu (
ip hotspot host print file=hotspot.txt;
ip dhcp-server lease print file=vypujcky.txt;
:global hotdata ([/file get [/file find name=hotspot.txt] contents])
:global vypujcky ([/file get [/file find name=vypujcky.txt] contents])
:global text1 (Uptime:$[/system resource get uptime])
:global text2 (Memory:$[/system resource get free-memory]b)
:global text3 (CPU:$[/system resource get cpu-load]%
)
:global text4 (HDD: $[/system resource get free-hdd-space]b
)
:global text5 ($[/interface get number=0 value-name=name]: TX:$[/interface get number=0 tx-packet]b, RX:$[/interface get number=0 rx-packet]b, $[/interface get number=0 value-name=run]
)
:global text6 ($[/interface get number=1 value-name=name]: TX:$[/interface get number=1 tx-packet]b, RX:$[/interface get number=1 rx-packet]b, $[/interface get number=1 value-name=run]
)
file set text.txt contents="
$text1
$text2
$text3
$text4
---------------Interface--------------------
$text5
$text6
------------ hotspot ------------
$hotdata
------------ DHCP --------------
$vypujcky"
:global obsah ([/file get [/file find name=text.txt] contents])
/tool e-mail send from="$[/system identity get name]@......cz" to="......cz" subject="$[/system identity get name]-hotspot" body=$obsah;
delay 10;
file remove hotspot.txt;
file remove vypujcky.txt;