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

@ -37,11 +37,19 @@ $BIN/v-delete-remote-dns-domains $host >>/dev/null 2>&1
# Deleting server
sed -i "/HOST='$host' /d" $VESTA/conf/dns-cluster.conf
# Disabling DNS_CLUSTER
# Delete DNS_CLUSTER key
check_cluster=$(grep HOST $VESTA/conf/dns-cluster.conf |wc -l)
if [ "$check_cluster" -eq '0' ]; then
rm -f $VESTA/conf/dns-cluster.conf
sed -i "/DNS_CLUSTER=/d" $VESTA/conf/vesta.conf
# Delete cron job
cmd="sudo /usr/local/vesta/bin/v-update-sys-queue dns-cluster"
check_cron=$(grep "$cmd" $VESTA/data/users/admin/cron.conf 2> /dev/null)
if [ ! -z "$check_cron" ]; then
eval $check_cron
$BIN/v-delete-cron-job admin "$JOB"
fi
fi