What's new

OpenVPN reset to defaults

davepnw

New Around Here
Trying to get OpenVPN working again on a remote RT-N66U (Merlin Firmware: RT-N66U_3.0.0.4_374.40_0) - is there any way (via SSH or otherwise) to reset the OpenVPN services settings back to all defaults?
 
As the /etc/init.d/openvpn script (which is what gets executed by /usr/sbin/service) does not offer any options to do it (at least with ubuntu-10.04), the answer is no.

But since it is all scripts, you can just edit /etc/init.d/openvpn and add something like

named-restart)
log_action_begin_msg "Restarting $DESC $2"
PIDFILE="/var/run/openvpn.${2}.pid"
NAME=$2
log_daemon_msg " Stopping VPN '$NAME'"
stop_vpn
sleep 1
log_daemon_msg " Restarting VPN '$NAME'"
start_vpn
if test -z "$PIDFILE" ; then
log_warning_msg " VPN $2 is not running."
fi
;;
after the

case "$1" in
dirctive. Later, you can simply call service openvpn named-restart <vpn-name>.
 

Similar 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!
Back
Top