|
|
@ -31,7 +31,7 @@ setup_config() { |
|
|
|
test $auth = "plain" && authsuffix="\[/var/etc/ocpasswd\]" |
|
|
|
|
|
|
|
dyndns="false" |
|
|
|
hostname=`uci show ddns|grep domain|head -1|cut -d '=' -f 2` |
|
|
|
hostname=`uci show ddns|grep domain|head -1|cut -d '=' -f 2 2>/dev/null` |
|
|
|
[ -n "$hostname" ] && dyndns="true" |
|
|
|
|
|
|
|
mkdir -p /var/etc |
|
|
@ -91,8 +91,8 @@ setup_dns() { |
|
|
|
start() { |
|
|
|
local hostname iface |
|
|
|
|
|
|
|
hostname=`uci show ddns|grep domain|head -1|cut -d '=' -f 2` |
|
|
|
[ -z "$hostname" ] && hostname=`uci get system.@system[0].hostname` |
|
|
|
hostname=`uci show ddns|grep domain|head -1|cut -d '=' -f 2 2>/dev/null` |
|
|
|
[ -z "$hostname" ] && hostname=`uci get system.@system[0].hostname 2>/dev/null` |
|
|
|
|
|
|
|
[ -d /etc/config/ocserv-dir ] || mkdir -p /etc/config/ocserv-dir |
|
|
|
[ -f /etc/ocserv/ca-key.pem ] && mv /etc/ocserv/ca-key.pem /etc/config/ocserv-dir/ca-key.pem |
|
|
|