|
|
@ -37,7 +37,7 @@ setup_config() { |
|
|
|
test $auth = "plain" && authsuffix="\[passwd=/var/etc/ocpasswd\]" |
|
|
|
|
|
|
|
dyndns="false" |
|
|
|
hostname=`uci show ddns|grep domain|head -1|cut -d '=' -f 2 2>/dev/null` |
|
|
|
hostname=`uci show ddns 2>/dev/null|grep domain|head -1|cut -d '=' -f 2` |
|
|
|
[ -n "$hostname" ] && dyndns="true" |
|
|
|
|
|
|
|
mkdir -p /var/etc |
|
|
@ -67,10 +67,9 @@ setup_users() { |
|
|
|
local password |
|
|
|
|
|
|
|
config_get name $1 name |
|
|
|
config_get group $1 group |
|
|
|
config_get group $1 group '*' |
|
|
|
config_get password $1 password |
|
|
|
|
|
|
|
[ -z "$group" ] && group='*' |
|
|
|
[ -z "$name" -o -z "$password" ] && return |
|
|
|
|
|
|
|
echo "$name:$group:$password" >> /var/etc/ocpasswd |
|
|
@ -100,7 +99,7 @@ setup_dns() { |
|
|
|
start() { |
|
|
|
local hostname iface |
|
|
|
|
|
|
|
hostname=`uci show ddns|grep domain|head -1|cut -d '=' -f 2 2>/dev/null` |
|
|
|
hostname=`uci show ddns 2>/dev/null|grep domain|head -1|cut -d '=' -f 2` |
|
|
|
[ -z "$hostname" ] && hostname=`uci get system.@system[0].hostname 2>/dev/null` |
|
|
|
|
|
|
|
[ -f /etc/config/ocserv-dir/ca-key.pem ] && mv /etc/config/ocserv-dir/ca-key.pem /etc/ocserv/ca-key.pem |
|
|
|