added sys-queue handler

This commit is contained in:
Serghey Rodin 2013-05-29 14:20:05 +03:00
commit 22ab6d500c
4 changed files with 32 additions and 11 deletions

View file

@ -1,6 +1,6 @@
#!/bin/bash
# info: synchronize dns domains
#
# options: HOST
# The function synchronize all dns domains.
@ -9,7 +9,8 @@
#----------------------------------------------------------#
# Argument defenition
verbose=$1
host=$1
verbose=$2
# Includes
source $VESTA/conf/vesta.conf
@ -44,8 +45,17 @@ fi
old_ifs="$IFS"
IFS=$'\n'
if [ -z $host ]; then
hosts=$(cat $VESTA/conf/dns-cluster.conf)
rm -f $VESTA/data/queue/dns-cluster.pipe
touch $VESTA/data/queue/dns-cluster.pipe
chmod 660 $VESTA/data/queue/dns-cluster.pipe
else
hosts=$(grep "HOST='$host'" $VESTA/conf/dns-cluster.conf)
fi
# Starting cluster loop
for cluster_str in $(cat $VESTA/conf/dns-cluster.conf); do
for cluster_str in $hosts; do
# Get host values
eval $cluster_str
@ -108,11 +118,6 @@ for cluster_str in $(cat $VESTA/conf/dns-cluster.conf); do
exit $E_CONNECT
fi
# Clean queue
rm -f $VESTA/data/queue/dns-cluster.pipe
touch $VESTA/data/queue/dns-cluster.pipe
chmod 660 $VESTA/data/queue/dns-cluster.pipe
# Start user loop
for user in $user_list; do