Thanks a ton!!!
Instances are not by the names of the sections, but by the sequence!
Here is the relevant output as you requested:
"openvpn": {
"instances": {
"instance1": {
"running": true,
"pid": 18678,
"command": [
"\/usr\/sbin\/openvpn",
"--syslog",
"openvpn(tunnel1)",
"--status",
"\/var\/run\/openvpn.tunnel1.status",
"--cd",
"\/var\/etc",
"--config",
"openvpn-tunnel1.conf"
],
"term_timeout": 5,
"respawn": {
"threshold": 3600,
"timeout": 5,
"retry": -1
}
},
"instance2": {
"running": true,
"pid": 3199,
"command": [
"\/usr\/sbin\/openvpn",
"--syslog",
"openvpn(tunnel2)",
"--status",
"\/var\/run\/openvpn.tunnel2.status",
"--cd",
"\/var\/etc",
"--config",
"openvpn-tunnel2.conf"
],
"term_timeout": 5,
"respawn": {
"threshold": 3600,
"timeout": 5,
"retry": -1
}
}
}
},
And following works flawlessly:
/etc/init.d/openvpn stop instance1
/etc/init.d/openvpn start instance1
So, the instances are always in the sequence the sections are defined in the config? Any way to call them by section names?