What's new

Question: Start OpenVPN Client from a Command-line

Rexcellent

New Around Here
Start OpenVPN Client from a Command-line

Hello All,

I have a situation that I think is easy to resolve for my RT-AC68U. My eventual goal is to have a CRON job (or CRU as the case may be), that starts my OpenVPN client, copies some files to the server side, and disconnects the OpenVPN session.

I thought I was clever to discover the OpenVPN Client process:

Code:
From `ps` command...

/etc/openvpn/vpnclient1 --cd /etc/openvpn/client1 --config config.ovpn

Running this line in a script works, with the exception that /etc/openvpn is a temporary directory. The directory does not exist after a reboot. It also gets deleted when I stop the OpenVPN client from the web interface. As far as I can tell, the directory only gets created when OpenVPN is started from the GUI. Presumably, this line:

Code:
From syslog.log...

Jul 21 11:27:33 rc_service: httpd 583:notify_rc start_vpnclient1

So I guess my question is: Is there a different command I can use to start an OpenVPN client session?

Thank you for taking the time to read this.
 
Last edited:
Code:
service start_vpnclient1
# do stuff
service stop_vpnclient1
 

Similar threads

Latest threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!

Members online

Back
Top