Where to place a startup script?

Hello Guys,
I have configure the OpenVPN server on my NAS (Firmware Version nwsp2 fvdw-sl 14.0) but can not figure out, where to place the command for starting it as a daemon. I already tried out to add the command to the file "/etc/init.d/rc.bootup2":
Then I have restarted the NAS and noticed that SSH won't work. Luckily I could restart SSH over the WEB-GUI (change Auth. method to key and back to password). After login in I check if at least OpenVPN is running. Nope. :-( So this won't work.
As I assume someone here knows better, could you help me out? Where I have to insert my command to start the daemon?
Thanks in Advance.
Björn
I have configure the OpenVPN server on my NAS (Firmware Version nwsp2 fvdw-sl 14.0) but can not figure out, where to place the command for starting it as a daemon. I already tried out to add the command to the file "/etc/init.d/rc.bootup2":
- Code: Select all
if (is_file("/etc/openvpn/server.conf"))
{{mwexec("/usr/sbin/openvpn --daemon --config /etc/openvpn/server.conf");}
Then I have restarted the NAS and noticed that SSH won't work. Luckily I could restart SSH over the WEB-GUI (change Auth. method to key and back to password). After login in I check if at least OpenVPN is running. Nope. :-( So this won't work.
As I assume someone here knows better, could you help me out? Where I have to insert my command to start the daemon?
Thanks in Advance.
Björn