Page 1 of 1

Where to place a startup script?

PostPosted: Fri Jul 12, 2013 10:23 am
by bgaul
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":
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

Re: Where to place a startup script?

PostPosted: Fri Jul 12, 2013 1:03 pm
by fvdw
there is a syntax error in your command

Code: Select all
 {{mwexec

should be
{mwexec


This syntax error makes the php script fail.

Re: Where to place a startup script?

PostPosted: Fri Jul 12, 2013 1:48 pm
by bgaul
Thanks. I see I should not configure things when I'm too tired and have too less coffee. That was the problem.