Fortigateが8.8.8.8へ疎通が取れることを確認します。疎通ができない場合は、再起動をします。
; コマンドオプション組立て
connect "192.168.4.254:22 /ssh /auth=password /user=admin /passwd=Zaq12wsx"
;8.8.8.8への疎通確認
wait 'Home-Fortigate'
sendln 'execute ping 8.8.8.8'
wait 'from 8.8.8' 'sendto failed'
; "from 8.8.8" が来たなら、:end
If result=1 goto end
;"sendto failed" が来ない場合、タイムアウトで:reboot へジャンプ。
if result=2 goto reboot
endif
:reboot
wait 'Home-Fortigate'
sendln 'execute reboot'
wait '(y/n)'
sendln 'y'
:end
wait 'Home-Fortigate'
sendln 'exit'