Control wifi from script

I am trying to write a bash script that will make the pi reconnect to my router incase something happens and it cant reconnect automatically.
The problem is that i thought this was a debian type distro…where is ifdown command ?

How can i do ifdown --force wlan0 in osmc then ?

connmanctl is your friend.

But, if it is unable to automatically reconnect I doubt manually trying to reconnect will help. Better to find and fix the underlying problem…