Browse Source

ocserv: silence warnings and set group default value

Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
lilik-openwrt-22.03
Nikos Mavrogiannopoulos 9 years ago
parent
commit
01851966b8
1 changed files with 3 additions and 4 deletions
  1. +3
    -4
      net/ocserv/files/ocserv.init

+ 3
- 4
net/ocserv/files/ocserv.init View File

@ -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


Loading…
Cancel
Save