Skip to content

Commit 4eac6fb

Browse files
authored
Allow the use of (hestiacp#2951)
v-add-remote-dns-host dev.xxxx.xxx 8083 'xxxxxxxx' '' '' "newuser"
1 parent 4ce5a48 commit 4eac6fb

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

bin/v-add-remote-dns-host

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ hash=$user
2525
HASH=$user
2626
password=$4; HIDE=4
2727
PASSWORD=$password
28-
type=${5-api}
28+
type=${5}
2929
TYPE="$type"
3030
dns_user=${6-dns-cluster}
3131
DNS_USER=$dns_user
@@ -44,6 +44,11 @@ source_conf "$HESTIA/conf/hestia.conf"
4444
# Verifications #
4545
#----------------------------------------------------------#
4646

47+
if [ -z "$type" ]; then
48+
type='api'
49+
TYPE="$type"
50+
fi
51+
4752
args_usage='HOST PORT USER [PASSWORD] [TYPE] [DNS_USER]'
4853
check_args '3' "$#" "$args_usage"
4954
is_format_valid 'host' 'port' 'dns_user'

0 commit comments

Comments
 (0)