Hi. I’m looking for a steer in the right direction if possible, rather than support to help me achieve this.
Currently, I have my vpn running 24/7 but need to disable it for certain addons. Ideally this process would be automated as an addon opens/ closes, but I don’t know if that’s possible. So, I’d like to create a shell script that I can map to a button press, which would start/stop my openvpn instance - the equivalent of SSHing into Vero and issuing systemctl start/ stop openvpn
I’ve tried creating a script using notepad++:
#! /bin/bash
sudo systemctl stop openvpn
(this works via command line with bash /path/to/script.sh)
…then map this script to a button press in keyboard.xml using RunScript (path/to/script.sh), but nothing happens.
Having done some digging on osmc and other forums I have a feeling I’d need to write a python script (about which I have no knowledge currently), but it would be really helpful to know if this is even possible first, before wasting a lot more time on this. Thank you!