openvpn: procd_set_param respawn
[openwrt/openwrt.git] / package / network / services / openvpn / files / openvpn.init
index 08832a086bd47197b49df104ae83dffdefa25008..1e0f384f97806da84eafe24f3a4db1aef411d802 100644 (file)
@@ -29,7 +29,7 @@ append_bools() {
        local p; local v; local s="$1"; shift
        for p in $*; do
                config_get_bool v "$s" "$p"
-               [ "$v" == 1 ] && append_param "$s" "$p" && echo >> "/var/etc/openvpn-$s.conf"
+               [ "$v" = 1 ] && append_param "$s" "$p" && echo >> "/var/etc/openvpn-$s.conf"
        done
 }
 
@@ -62,6 +62,7 @@ openvpn_add_instance() {
                --cd "$dir" \
                --config "$conf"
        procd_set_param file "$dir/$conf"
+       procd_set_param respawn
        procd_close_instance
 }
 
@@ -113,7 +114,8 @@ start_instance() {
                route_metric route_up rport script_security secret server server_bridge setenv shaper sndbuf \
                socks_proxy status status_version syslog tcp_queue_limit tls_auth \
                tls_cipher tls_remote tls_timeout tls_verify tmp_dir topology tran_window \
-               tun_mtu tun_mtu_extra txqueuelen user verb down push up
+               tun_mtu tun_mtu_extra txqueuelen user verb down push up \
+               ifconfig_ipv6 route_ipv6 server_ipv6 ifconfig_ipv6_pool ifconfig_ipv6_push iroute_ipv6
 
        openvpn_add_instance "$s" "/var/etc" "openvpn-$s.conf"
 }