dns cluster support

This commit is contained in:
Serghey Rodin 2013-05-28 16:09:07 +03:00
commit 68a34e18b7
47 changed files with 1536 additions and 64 deletions

View file

@ -32,27 +32,29 @@ PATH=$PATH:$BIN
#----------------------------------------------------------#
check_args '1' "$#" 'QUEUE'
b_task=$(ps auxf |grep -v "grep" |grep "$VESTA/bin/v-update-sys-queue backup")
b_task=$(echo "$b_task" |grep -v sudo |wc -l)
if [ "$b_task" -gt 2 ]; then
exit
fi
#----------------------------------------------------------#
# Action #
#----------------------------------------------------------#
b_task=$(ps auxf |grep -v "grep" |grep "$VESTA/bin/v-update-sys-queue backup")
b_task=$(echo "$b_task" |grep -v sudo |wc -l)
d_task=$(ps auxf |grep -v "grep" |grep "$VESTA/bin/v-update-sys-queue dns")
d_task=$(echo "$d_task" |grep -v sudo |wc -l)
if [ "$b_task" -gt 2 ] || [ "$d_task" -gt 2 ]; then
exit
fi
# Defining pipe functions
case $queue in
restart) bash $VESTA/data/queue/restart.pipe;
rm $VESTA/data/queue/restart.pipe;
touch $VESTA/data/queue/restart.pipe;;
webstats) bash $VESTA/data/queue/webstats.pipe > /dev/null 2>&1 ;;
backup) bash $VESTA/data/queue/backup.pipe > /dev/null 2>&1 ;;
disk) bash $VESTA/data/queue/disk.pipe;;
traffic) bash $VESTA/data/queue/traffic.pipe;;
*) check_args '1' '0' 'QUEUE'
restart) bash $VESTA/data/queue/$queue.pipe ;;
webstats) bash $VESTA/data/queue/$queue.pipe > /dev/null 2>&1 ;;
backup) bash $VESTA/data/queue/$queue.pipe > /dev/null 2>&1 ;;
disk) bash $VESTA/data/queue/$queue.pipe ;;
traffic) bash $VESTA/data/queue/$queue.pipe ;;
dns-cluster) bash $VESTA/data/queue/$queue.pipe ;;
*) check_args '1' '0' 'QUEUE' ;;
esac