I have been using x3mrouting for sometime. I am familiar with the environment and have nothing to reference what it looks like without x3mrouiting.
Here is my understanding, any vpn event will automatically trigger /jffs/scripts/openvpn-event script to run. There are two parameters: $dev (in the form of tun11-tun15/tun21-tun22), and $script_type (either "route-up" or "route-pre-down").
What x3mrouting does is, it has a script in openvpn-event script. So any openvpn event will call the x3mrouting script. The x3mrouting script in turns look for individual scripts that has a path set to /jffs/scripts/x3mrouting, based on the two input parameters $dev & $script_type. For example, in the event of vpnc1 up, the vpnclient1_route-up script is located in this path will be called.
I don't know what it looks like without x3mrouting. Probably need to call these vpnclientX-route-up script from openvpn-event script.
Maybe can try something like this in openvpn-event script:
Code:
[ "${dev:0:4}" = 'tun1' ] && vpn_id=${dev:4:1} && [ "$script_type" = 'route-up' ] && /jffs/addons/unbound/unbound_DNS_via_OVPN.sh $vpn_id start &
[ "${dev:0:4}" = 'tun1' ] && vpn_id=${dev:4:1} && [ "$script_type" = 'route-pre-down' ] && /jffs/addons/unbound/unbound_DNS_via_OVPN.sh $vpn_id stop &