Turns out there is a workaround. It really depends on your case though. I want to replace SSTP with L2TP and want to make sure, that the L2TP-Connection is working and then disable the SSTP-Connection.
If you answer the following questions with yes, this workaround should work for you:
- You want to run a script via "import file"?
- Your script contains monitoring commands (e.g. /interface sstp-client monitor my_sstp_interface as-value once) that your logic depends on, but it does not return any value inside the script?
- You are not depending on the results being returned as API-Response?
The workaround:
Instead of running the command via the imported file, you simply add a scheduler, that will run your command. After the command has been run, you can remove the scheduler. So in total it looks something like this:
# Import.rsc
/系统调度程序添加名称= mySchedulerImport国米val=1m on-event=":local sstpConnected;\r\ \n[/interface sstp-client monitor my_sstp_interface_name once do={:set \$sstpConnected (\$status = \"connected\");}]\r\ \n\r\ \n:log info \$sstpConnected;\r\ \n\r\ \n/system scheduler remove mySchedulerImport" policy=ftp,reboot,read,write,policy,test,password,sniff,sensitive,romon start-date=apr/06/2020 start-time=13:15:00
Make sure to replace "my_sstp_interface_name" with your interface-name.
Hope this helps someone in the future!