The OpenVPN package ships with /etc/init.d/openvpn you don't have to write your own to start up on boot. This init will load a UCI based configuration (/etc/config/openvpn) however you can have a very simple UCI configuration which just loads your own file in native format.
Delete the /etc/config/openvpn which comes with the package and replace it with this:
The reason the file is named vpn.ovpn is that when OpenVPN runs, it will load and attempt to parse every file named *.conf in /etc/openvpn. For that reason it is not recommended to have any files named *.conf in /etc/openvpn unless you want a very simple single configuration. Conventionally OpenVPN native config files are named .ovpn instead, so you can have multiple .ovpn files scattered around and only one will be used.
Yeah, i've tried that but i don't know why (years of negligence and workarounds on my router, maybe) my vpn configuration doesn't show up on Luci (i'm guessing i wrote in manually back then and maybe it isn't somewhere on its database or something like that). Anyway, when I add the configuration to that file, it show on Luci as enabled, but it's never started. And it can't be started by clicking the "start" button either. That's why i'm trying the startup script.
It's irrelevant. The configuration file works fine, the VPN is up and running. The problem is restricted to the init script.
Even if i run manually /etc/init.d/vpn start (this is my init script) it works like a charm.
when i type /etc/init.d/vpn enable i can see the symlinks on rc.d too.
Another thing: specify full paths to your ca key etc files. The working directory is uncertain during auto start. And what I said before name the config file .ovpn or anything but .conf and make sure there are no files named *.conf in /etc/openvpn.
OpenVPN is very verbose to the log it should show why it did not start.