mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-21 05:44:07 -07:00
skip nonexisting domains
This commit is contained in:
parent
d9dde8517b
commit
0f7c02ee4e
1 changed files with 11 additions and 2 deletions
|
@ -26,8 +26,6 @@ source $VESTA/conf/vesta.conf
|
||||||
check_args '2' "$#" 'USER DOMAIN'
|
check_args '2' "$#" 'USER DOMAIN'
|
||||||
validate_format 'user' 'domain'
|
validate_format 'user' 'domain'
|
||||||
is_system_enabled "$DNS_CLUSTER" 'DNS_CLUSTER'
|
is_system_enabled "$DNS_CLUSTER" 'DNS_CLUSTER'
|
||||||
is_object_valid 'user' 'USER' "$user"
|
|
||||||
is_object_valid 'dns' 'DOMAIN' "$domain"
|
|
||||||
|
|
||||||
if [ ! -e "$VESTA/conf/dns-cluster.conf" ]; then
|
if [ ! -e "$VESTA/conf/dns-cluster.conf" ]; then
|
||||||
echo "Error: dns-cluster.conf doesn't exist"
|
echo "Error: dns-cluster.conf doesn't exist"
|
||||||
|
@ -47,6 +45,17 @@ fi
|
||||||
# Action #
|
# Action #
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
|
||||||
|
# Check domain existance
|
||||||
|
check_local_domain=$(grep "DOMAIN='$domain'" $USER_DATA/dns.conf 2>/dev/null)
|
||||||
|
if [ -z "$check_local_domain" ]; then
|
||||||
|
pipe="$VESTA/data/queue/dns-cluster.pipe"
|
||||||
|
str=$(grep -n "$SCRIPT $1 $2$" $pipe | cut -f1 -d: | head -n1)
|
||||||
|
if [ ! -z "$str" ]; then
|
||||||
|
sed -i "$str d" $pipe
|
||||||
|
fi
|
||||||
|
exit
|
||||||
|
fi
|
||||||
|
|
||||||
old_ifs="$IFS"
|
old_ifs="$IFS"
|
||||||
IFS=$'\n'
|
IFS=$'\n'
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue