Where to place a startup script?

Where to place a startup script?

Postby bgaul » Fri Jul 12, 2013 10:23 am

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
bgaul
 
Posts: 5
Joined: Tue Jul 09, 2013 9:55 am

Re: Where to place a startup script?

Postby fvdw » Fri Jul 12, 2013 1:03 pm

there is a syntax error in your command

Code: Select all
 {{mwexec

should be
{mwexec


This syntax error makes the php script fail.
fvdw
Site Admin - expert
 
Posts: 13471
Joined: Tue Apr 12, 2011 2:30 pm
Location: Netherlands

Re: Where to place a startup script?

Postby bgaul » Fri Jul 12, 2013 1:48 pm

Thanks. I see I should not configure things when I'm too tired and have too less coffee. That was the problem.
bgaul
 
Posts: 5
Joined: Tue Jul 09, 2013 9:55 am


Return to Development

Who is online

Users browsing this forum: mistert and 6 guests