mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-20 21:34:11 -07:00
dns cluster support
This commit is contained in:
parent
0f7ea97e12
commit
68a34e18b7
47 changed files with 1536 additions and 64 deletions
|
@ -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
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue