implemented scheduled restart

This commit is contained in:
Serghey Rodin 2013-06-01 14:25:44 +03:00
parent ca81632e82
commit 10f7097c48
46 changed files with 172 additions and 63 deletions

View file

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# info: add cron job # info: add cron job
# options: USER MIN HOUR DAY MONTH WDAY COMMAND [JOB] # options: USER MIN HOUR DAY MONTH WDAY COMMAND [JOB] [RESTART]
# #
# The function adds a job to cron daemon. When executing commands, any output # The function adds a job to cron daemon. When executing commands, any output
# is mailed to user's email if parameter REPORTS is set to 'yes'. # is mailed to user's email if parameter REPORTS is set to 'yes'.
@ -19,6 +19,7 @@ month=$5
wday=$6 wday=$6
command=$(echo $7 | sed -e "s/'/%quote%/g") command=$(echo $7 | sed -e "s/'/%quote%/g")
job=$8 job=$8
restart=$9
# Includes # Includes
source $VESTA/conf/vesta.conf source $VESTA/conf/vesta.conf
@ -32,7 +33,7 @@ A7="$command"
# Verifications # # Verifications #
#----------------------------------------------------------# #----------------------------------------------------------#
check_args '7' "$#" 'USER MIN HOUR DAY MONTH WDAY COMMAND [JOB]' check_args '7' "$#" 'USER MIN HOUR DAY MONTH WDAY COMMAND [JOB] [RESTART]'
validate_format 'user' 'min' 'hour' 'day' 'month' 'wday' 'command' validate_format 'user' 'min' 'hour' 'day' 'month' 'wday' 'command'
is_system_enabled "$CRON_SYSTEM" 'CRON_SYSTEM' is_system_enabled "$CRON_SYSTEM" 'CRON_SYSTEM'
is_object_valid 'user' 'USER' "$user" is_object_valid 'user' 'USER' "$user"
@ -72,7 +73,7 @@ sync_cron_jobs
increase_user_value $user '$U_CRON_JOBS' increase_user_value $user '$U_CRON_JOBS'
# Restart crond # Restart crond
$BIN/v-restart-cron "$EVENT" $BIN/v-restart-cron
# Logging # Logging
log_history "added cron job $job" log_history "added cron job $job"

View file

@ -45,7 +45,7 @@ sync_cron_jobs
#----------------------------------------------------------# #----------------------------------------------------------#
# Restart crond # Restart crond
$BIN/v-restart-cron "$EVENT" $BIN/v-restart-cron
# Logging # Logging
log_history "enabled cron reporting" log_history "enabled cron reporting"

View file

@ -94,13 +94,13 @@ for cluster_str in $(cat $VESTA/conf/dns-cluster.conf); do
# Sync domain # Sync domain
str=$(grep "DOMAIN='$domain'" $USER_DATA/dns.conf) str=$(grep "DOMAIN='$domain'" $USER_DATA/dns.conf)
eval $str eval $str
$send_cmd v-insert-dns-domain $DNS_USER "$str" $HOSTNAME $send_cmd v-insert-dns-domain $DNS_USER "$str" $HOSTNAME 'flush' 'no'
# Sync records # Sync records
if [ "$TYPE" = 'ssh' ]; then if [ "$TYPE" = 'ssh' ]; then
tmp=$(mktemp -u) tmp=$(mktemp -u)
scp_cmd $USER_DATA/dns/$DOMAIN.conf $tmp scp_cmd $USER_DATA/dns/$DOMAIN.conf $tmp
$send_cmd v-insert-dns-records $DNS_USER $DOMAIN $tmp $send_cmd v-insert-dns-records $DNS_USER $DOMAIN $tmp 'no'
else else
for str in $(cat $USER_DATA/dns/$DOMAIN.conf); do for str in $(cat $USER_DATA/dns/$DOMAIN.conf); do
str=$(echo "$str" | sed 's/"/\\"/g') str=$(echo "$str" | sed 's/"/\\"/g')
@ -109,7 +109,7 @@ for cluster_str in $(cat $VESTA/conf/dns-cluster.conf); do
fi fi
# Rebuild dns zone # Rebuild dns zone
$send_cmd v-rebuild-dns-domain $DNS_USER $domain no $send_cmd v-rebuild-dns-domain $DNS_USER $domain 'scheduled'
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "Error: $TYPE connection to $HOST failed (rebuild)" echo "Error: $TYPE connection to $HOST failed (rebuild)"
log_event "$E_CONNECT $EVENT" log_event "$E_CONNECT $EVENT"

View file

@ -96,10 +96,10 @@ for cluster_str in $(cat $VESTA/conf/dns-cluster.conf); do
# Sync record # Sync record
str=$(grep "ID='$id'" $USER_DATA/dns/$domain.conf) str=$(grep "ID='$id'" $USER_DATA/dns/$domain.conf)
str=$(echo "$str" | sed 's/"/\\"/g') str=$(echo "$str" | sed 's/"/\\"/g')
$send_cmd v-insert-dns-record $DNS_USER $domain "$str" $send_cmd v-insert-dns-record $DNS_USER $domain "$str" 'no'
# Rebuild dns zone # Rebuild dns zone
$send_cmd v-rebuild-dns-domain $DNS_USER $domain no $send_cmd v-rebuild-dns-domain $DNS_USER $domain 'scheduled'
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "Error: $TYPE connection to $HOST failed (rebuild)" echo "Error: $TYPE connection to $HOST failed (rebuild)"
log_event "$E_CONNECT $EVENT" log_event "$E_CONNECT $EVENT"

View file

@ -97,7 +97,7 @@ update_object_value 'web' 'DOMAIN' "$domain" '$PROXY_EXT' "$extentions"
# Restart web server # Restart web server
if [ "$restart" != 'no' ]; then if [ "$restart" != 'no' ]; then
$BIN/v-restart-proxy "$EVENT" $BIN/v-restart-proxy
fi fi
log_history "enabled proxy support for $domain" log_history "enabled proxy support for $domain"

View file

@ -124,7 +124,7 @@ update_object_value 'web' 'DOMAIN' "$domain" '$SSL' "yes"
# Restart web server # Restart web server
if [ "$restart" != 'no' ]; then if [ "$restart" != 'no' ]; then
$BIN/v-restart-web "$EVENT" $BIN/v-restart-web
fi fi
# Logging # Logging

View file

@ -64,7 +64,7 @@ sync_cron_jobs
#----------------------------------------------------------# #----------------------------------------------------------#
# Restart crond # Restart crond
$BIN/v-restart-cron "$EVENT" $BIN/v-restart-cron
# Logging # Logging
log_history "changed cron job $job" log_history "changed cron job $job"

View file

@ -59,7 +59,7 @@ fi
# Restart named # Restart named
if [ "$restart" != 'no' ]; then if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns "$EVENT" $BIN/v-restart-dns
fi fi
# Logging # Logging

View file

@ -58,7 +58,7 @@ fi
# Restart named # Restart named
if [ "$restart" != 'no' ]; then if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns "$EVENT" $BIN/v-restart-dns
fi fi
# Logging # Logging

View file

@ -94,7 +94,7 @@ for cluster_str in $(cat $VESTA/conf/dns-cluster.conf); do
# Sync domain # Sync domain
str=$(grep "DOMAIN='$domain'" $USER_DATA/dns.conf) str=$(grep "DOMAIN='$domain'" $USER_DATA/dns.conf)
eval $str eval $str
$send_cmd v-insert-dns-domain $DNS_USER "$str" $HOSTNAME 'no' $send_cmd v-insert-dns-domain $DNS_USER "$str" $HOSTNAME 'scheduled'
done done

View file

@ -97,7 +97,7 @@ for cluster_str in $(cat $VESTA/conf/dns-cluster.conf); do
$send_cmd v-insert-dns-domain $DNS_USER "$str" $HOSTNAME 'no' $send_cmd v-insert-dns-domain $DNS_USER "$str" $HOSTNAME 'no'
# Rebuild dns zone # Rebuild dns zone
$send_cmd v-rebuild-dns-domain $DNS_USER $domain no $send_cmd v-rebuild-dns-domain $DNS_USER $domain 'scheduled'
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "Error: $TYPE connection to $HOST failed (rebuild)" echo "Error: $TYPE connection to $HOST failed (rebuild)"
log_event "$E_CONNECT $EVENT" log_event "$E_CONNECT $EVENT"

View file

@ -97,7 +97,7 @@ for cluster_str in $(cat $VESTA/conf/dns-cluster.conf); do
$send_cmd v-insert-dns-domain $DNS_USER "$str" $HOSTNAME 'no' $send_cmd v-insert-dns-domain $DNS_USER "$str" $HOSTNAME 'no'
# Rebuild dns zone # Rebuild dns zone
$send_cmd v-rebuild-dns-domain $DNS_USER $domain no $send_cmd v-rebuild-dns-domain $DNS_USER $domain 'scheduled'
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "Error: $TYPE connection to $HOST failed (rebuild)" echo "Error: $TYPE connection to $HOST failed (rebuild)"
log_event "$E_CONNECT $EVENT" log_event "$E_CONNECT $EVENT"

View file

@ -66,7 +66,7 @@ fi
# Restart ftp server # Restart ftp server
if [ "$restart" != 'no' ]; then if [ "$restart" != 'no' ]; then
$BIN/v-restart-ftp "$EVENT" $BIN/v-restart-ftp
fi fi
# Logging # Logging

View file

@ -53,7 +53,7 @@ sync_cron_jobs
decrease_user_value "$user" '$U_CRON_JOBS' decrease_user_value "$user" '$U_CRON_JOBS'
# Restart crond # Restart crond
$BIN/v-restart-cron "$EVENT" $BIN/v-restart-cron
# Logging # Logging
log_history "deleted cron job $job" log_history "deleted cron job $job"

View file

@ -45,7 +45,7 @@ sync_cron_jobs
#----------------------------------------------------------# #----------------------------------------------------------#
# Restart crond # Restart crond
$BIN/v-restart-cron "$EVENT" $BIN/v-restart-cron
# Logging # Logging
log_history "disabled cron reporting" log_history "disabled cron reporting"

View file

@ -65,7 +65,7 @@ decrease_user_value "$user" '$U_DNS_RECORDS' "$records"
# Restart named # Restart named
if [ "$restart" != 'no' ]; then if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns "$EVENT" $BIN/v-restart-dns $restart
fi fi
# Logging # Logging

View file

@ -42,7 +42,7 @@ done
#----------------------------------------------------------# #----------------------------------------------------------#
# Restart named # Restart named
$BIN/v-restart-dns "$EVENT" $BIN/v-restart-dns
# Logging # Logging
log_event "$OK" "$EVENT" log_event "$OK" "$EVENT"

View file

@ -45,7 +45,7 @@ done
# Restart named # Restart named
if [ "$restart" != 'no' ]; then if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns "$EVENT" $BIN/v-restart-dns
fi fi
# Logging # Logging

View file

@ -90,7 +90,7 @@ for cluster_str in $(cat $VESTA/conf/dns-cluster.conf); do
fi fi
# Sync domain # Sync domain
$send_cmd v-delete-dns-domain $DNS_USER $domain 'no' $send_cmd v-delete-dns-domain $DNS_USER $domain 'scheduled'
done done

View file

@ -96,7 +96,7 @@ for cluster_str in $hosts; do
fi fi
# Clean source records # Clean source records
$send_cmd v-delete-dns-domains-src $DNS_USER $HOSTNAME no $send_cmd v-delete-dns-domains-src $DNS_USER $HOSTNAME 'no'
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "Error: $TYPE connection to $HOST failed (cleanup)" echo "Error: $TYPE connection to $HOST failed (cleanup)"
log_event "$E_CONNECT $EVENT" log_event "$E_CONNECT $EVENT"
@ -104,7 +104,7 @@ for cluster_str in $hosts; do
fi fi
# Rebuild dns zones # Rebuild dns zones
$send_cmd v-rebuild-dns-domains $DNS_USER $send_cmd v-rebuild-dns-domains $DNS_USER 'scheduled'
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
echo "Error: $TYPE connection to $HOST failed (rebuild)" echo "Error: $TYPE connection to $HOST failed (rebuild)"
log_event "$E_CONNECT $EVENT" log_event "$E_CONNECT $EVENT"

View file

@ -86,7 +86,7 @@ for cluster_str in $(cat $VESTA/conf/dns-cluster.conf); do
fi fi
# Sync domain # Sync domain
$send_cmd v-delete-dns-record $DNS_USER $domain $id 'no' $send_cmd v-delete-dns-record $DNS_USER $domain $id 'scheduled'
done done

View file

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# info: insert dns record # info: insert dns record
# options: USER DOMAIN DATA # options: USER DOMAIN DATA [RESTART]
# #
# The function inserts raw dns record to the domain conf # The function inserts raw dns record to the domain conf
@ -13,6 +13,7 @@
user=$1 user=$1
domain=$2 domain=$2
data=$3 data=$3
restart=$4
# Includes # Includes
source $VESTA/conf/vesta.conf source $VESTA/conf/vesta.conf
@ -23,7 +24,7 @@ source $VESTA/func/main.sh
# Verifications # # Verifications #
#----------------------------------------------------------# #----------------------------------------------------------#
check_args '3' "$#" 'USER DOMAIN DATA' check_args '3' "$#" 'USER DOMAIN DATA [RESTART]'
validate_format 'user' 'domain' 'data' validate_format 'user' 'domain' 'data'
is_system_enabled "$DNS_SYSTEM" 'DNS_SYSTEM' is_system_enabled "$DNS_SYSTEM" 'DNS_SYSTEM'
is_object_valid 'user' 'USER' "$user" is_object_valid 'user' 'USER' "$user"
@ -43,6 +44,11 @@ echo "$data" >> $USER_DATA/dns/$domain.conf
# Vesta # # Vesta #
#----------------------------------------------------------# #----------------------------------------------------------#
# Restart named
if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns $restart
fi
# Logging # Logging
log_event "$OK" "$EVENT" log_event "$OK" "$EVENT"

View file

@ -1,6 +1,6 @@
#!/bin/bash #!/bin/bash
# info: inserts dns records # info: inserts dns records
# options: USER DOMAIN DATA_FILE # options: USER DOMAIN DATA_FILE [RESTART]
# #
# The function copy dns record to the domain conf # The function copy dns record to the domain conf
@ -13,6 +13,7 @@
user=$1 user=$1
domain=$2 domain=$2
data_file=$3 data_file=$3
restart=$4
# Includes # Includes
source $VESTA/conf/vesta.conf source $VESTA/conf/vesta.conf
@ -23,7 +24,7 @@ source $VESTA/func/main.sh
# Verifications # # Verifications #
#----------------------------------------------------------# #----------------------------------------------------------#
check_args '3' "$#" 'USER DOMAIN DATAFILE' check_args '3' "$#" 'USER DOMAIN DATAFILE [RESTART]'
validate_format 'user' 'domain' 'data_file' validate_format 'user' 'domain' 'data_file'
is_system_enabled "$DNS_SYSTEM" 'DNS_SYSTEM' is_system_enabled "$DNS_SYSTEM" 'DNS_SYSTEM'
is_object_valid 'user' 'USER' "$user" is_object_valid 'user' 'USER' "$user"
@ -46,6 +47,11 @@ fi
# Vesta # # Vesta #
#----------------------------------------------------------# #----------------------------------------------------------#
# Restart named
if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns
fi
# Logging # Logging
log_event "$OK" "$EVENT" log_event "$OK" "$EVENT"

View file

@ -42,7 +42,7 @@ sync_cron_jobs
# Restart crond # Restart crond
if [ "$restart" != 'no' ]; then if [ "$restart" != 'no' ]; then
$BIN/v-restart-cron "$EVENT" $BIN/v-restart-cron
fi fi
# Logging # Logging

View file

@ -68,7 +68,7 @@ update_user_value "$user" '$SUSPENDED_DNS' "$suspended_dns"
# Restart named # Restart named
if [ "$restart" != 'no' ]; then if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns "$EVENT" $BIN/v-restart-dns
fi fi
# Logging # Logging

View file

@ -18,6 +18,17 @@ source $VESTA/func/main.sh
# Action # # Action #
#----------------------------------------------------------# #----------------------------------------------------------#
# Schedule restart
if [ "$1" = 'scheduled' ]; then
echo "$BIN/$SCRIPT now" >> $VESTA/data/queue/restart.pipe
exit
fi
if [ -z "$1" ] && [ "$SCHEDULED_RESTART" = 'yes' ]; then
echo "$BIN/$SCRIPT now" >> $VESTA/data/queue/restart.pipe
exit
fi
# Restart system
if [ ! -z "$CRON_SYSTEM" ]; then if [ ! -z "$CRON_SYSTEM" ]; then
/etc/init.d/$CRON_SYSTEM reload >/dev/null 2>&1 /etc/init.d/$CRON_SYSTEM reload >/dev/null 2>&1
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
@ -28,6 +39,11 @@ if [ ! -z "$CRON_SYSTEM" ]; then
fi fi
fi fi
# Update restart queue
if [ -e "$VESTA/data/queue/restart.pipe" ]; then
sed -i "/$SCRIPT/d" $VESTA/data/queue/restart.pipe
fi
#----------------------------------------------------------# #----------------------------------------------------------#
# Vesta # # Vesta #

View file

@ -18,6 +18,17 @@ source $VESTA/func/main.sh
# Action # # Action #
#----------------------------------------------------------# #----------------------------------------------------------#
# Schedule restart
if [ "$1" = 'scheduled' ]; then
echo "$BIN/$SCRIPT now" >> $VESTA/data/queue/restart.pipe
exit
fi
if [ -z "$1" ] && [ "$SCHEDULED_RESTART" = 'yes' ]; then
echo "$BIN/$SCRIPT now" >> $VESTA/data/queue/restart.pipe
exit
fi
# Restart system
if [ ! -z "$DNS_SYSTEM" ]; then if [ ! -z "$DNS_SYSTEM" ]; then
/etc/init.d/$DNS_SYSTEM reload >/dev/null 2>&1 /etc/init.d/$DNS_SYSTEM reload >/dev/null 2>&1
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
@ -28,6 +39,11 @@ if [ ! -z "$DNS_SYSTEM" ]; then
fi fi
fi fi
# Update restart queue
if [ -e "$VESTA/data/queue/restart.pipe" ]; then
sed -i "/$SCRIPT/d" $VESTA/data/queue/restart.pipe
fi
#----------------------------------------------------------# #----------------------------------------------------------#
# Vesta # # Vesta #

View file

@ -18,6 +18,17 @@ source $VESTA/func/main.sh
# Action # # Action #
#----------------------------------------------------------# #----------------------------------------------------------#
# Schedule restart
if [ "$1" = 'scheduled' ]; then
echo "$BIN/$SCRIPT now" >> $VESTA/data/queue/restart.pipe
exit
fi
if [ -z "$1" ] && [ "$SCHEDULED_RESTART" = 'yes' ]; then
echo "$BIN/$SCRIPT now" >> $VESTA/data/queue/restart.pipe
exit
fi
# Restart system
if [ ! -z "$FTP_SYSTEM" ]; then if [ ! -z "$FTP_SYSTEM" ]; then
/etc/init.d/$FTP_SYSTEM reload >/dev/null 2>&1 /etc/init.d/$FTP_SYSTEM reload >/dev/null 2>&1
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
@ -28,6 +39,11 @@ if [ ! -z "$FTP_SYSTEM" ]; then
fi fi
fi fi
# Update restart queue
if [ -e "$VESTA/data/queue/restart.pipe" ]; then
sed -i "/$SCRIPT/d" $VESTA/data/queue/restart.pipe
fi
#----------------------------------------------------------# #----------------------------------------------------------#
# Vesta # # Vesta #

View file

@ -18,6 +18,17 @@ source $VESTA/func/main.sh
# Action # # Action #
#----------------------------------------------------------# #----------------------------------------------------------#
# Schedule restart
if [ "$1" = 'scheduled' ]; then
echo "$BIN/$SCRIPT now" >> $VESTA/data/queue/restart.pipe
exit
fi
if [ -z "$1" ] && [ "$SCHEDULED_RESTART" = 'yes' ]; then
echo "$BIN/$SCRIPT now" >> $VESTA/data/queue/restart.pipe
exit
fi
# Restart system
if [ ! -z "$MAIL_SYSTEM" ]; then if [ ! -z "$MAIL_SYSTEM" ]; then
/etc/init.d/$MAIL_SYSTEM reload >/dev/null 2>&1 /etc/init.d/$MAIL_SYSTEM reload >/dev/null 2>&1
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
@ -28,6 +39,11 @@ if [ ! -z "$MAIL_SYSTEM" ]; then
fi fi
fi fi
# Update restart queue
if [ -e "$VESTA/data/queue/restart.pipe" ]; then
sed -i "/$SCRIPT/d" $VESTA/data/queue/restart.pipe
fi
#----------------------------------------------------------# #----------------------------------------------------------#
# Vesta # # Vesta #

View file

@ -18,6 +18,17 @@ source $VESTA/func/main.sh
# Action # # Action #
#----------------------------------------------------------# #----------------------------------------------------------#
# Schedule restart
if [ "$1" = 'scheduled' ]; then
echo "$BIN/$SCRIPT now" >> $VESTA/data/queue/restart.pipe
exit
fi
if [ -z "$1" ] && [ "$SCHEDULED_RESTART" = 'yes' ]; then
echo "$BIN/$SCRIPT now" >> $VESTA/data/queue/restart.pipe
exit
fi
# Restart system
if [ ! -z "$PROXY_SYSTEM" ]; then if [ ! -z "$PROXY_SYSTEM" ]; then
/etc/init.d/$PROXY_SYSTEM reload >/dev/null 2>&1 /etc/init.d/$PROXY_SYSTEM reload >/dev/null 2>&1
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
@ -28,6 +39,11 @@ if [ ! -z "$PROXY_SYSTEM" ]; then
fi fi
fi fi
# Update restart queue
if [ -e "$VESTA/data/queue/restart.pipe" ]; then
sed -i "/$SCRIPT/d" $VESTA/data/queue/restart.pipe
fi
#----------------------------------------------------------# #----------------------------------------------------------#
# Vesta # # Vesta #

View file

@ -18,6 +18,17 @@ source $VESTA/func/main.sh
# Action # # Action #
#----------------------------------------------------------# #----------------------------------------------------------#
# Schedule restart
if [ "$1" = 'scheduled' ]; then
echo "$BIN/$SCRIPT now" >> $VESTA/data/queue/restart.pipe
exit
fi
if [ -z "$1" ] && [ "$SCHEDULED_RESTART" = 'yes' ]; then
echo "$BIN/$SCRIPT now" >> $VESTA/data/queue/restart.pipe
exit
fi
# Restart system
if [ ! -z "$WEB_SYSTEM" ]; then if [ ! -z "$WEB_SYSTEM" ]; then
/etc/init.d/$WEB_SYSTEM reload >/dev/null 2>&1 /etc/init.d/$WEB_SYSTEM reload >/dev/null 2>&1
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
@ -28,6 +39,11 @@ if [ ! -z "$WEB_SYSTEM" ]; then
fi fi
fi fi
# Update restart queue
if [ -e "$VESTA/data/queue/restart.pipe" ]; then
sed -i "/$SCRIPT/d" $VESTA/data/queue/restart.pipe
fi
#----------------------------------------------------------# #----------------------------------------------------------#
# Vesta # # Vesta #

View file

@ -469,7 +469,7 @@ if [ "$dns" != 'no' ]; then
done done
# Restart DNS # Restart DNS
$BIN/v-restart-dns "$EVENT" $BIN/v-restart-dns
echo echo
msg="$msg\n" msg="$msg\n"
fi fi
@ -682,7 +682,7 @@ if [ "$cron" != 'no' ]; then
sync_cron_jobs sync_cron_jobs
# Restart cron # Restart cron
$BIN/v-restart-cron "$EVENT" $BIN/v-restart-cron
echo echo
msg="$msg\n" msg="$msg\n"
fi fi

View file

@ -48,7 +48,7 @@ sync_cron_jobs
# Restart crond # Restart crond
if [ "$restart" != 'no' ]; then if [ "$restart" != 'no' ]; then
$BIN/v-restart-cron "$EVENT" $BIN/v-restart-cron
fi fi
# Logging # Logging

View file

@ -43,7 +43,7 @@ done
# Restart crond # Restart crond
if [ "$restart" != 'no' ]; then if [ "$restart" != 'no' ]; then
$BIN/v-restart-cron "$EVENT" $BIN/v-restart-cron
fi fi
# Logging # Logging

View file

@ -51,7 +51,7 @@ increase_user_value "$user" '$SUSPENDED_DNS'
# Restart named # Restart named
#if [ "$restart" != 'no' ]; then #if [ "$restart" != 'no' ]; then
# $BIN/v-restart-dns "$EVENT" # $BIN/v-restart-dns
#fi #fi
# Logging # Logging

View file

@ -43,9 +43,9 @@ done
#----------------------------------------------------------# #----------------------------------------------------------#
# Restart dns server # Restart dns server
if [ "$restart" != 'no' ]; then #if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns "$EVENT" # $BIN/v-restart-dns
fi #fi
# Logging # Logging
log_event "$OK" "$EVENT" log_event "$OK" "$EVENT"

View file

@ -61,9 +61,9 @@ update_domain_zone
#----------------------------------------------------------# #----------------------------------------------------------#
# Restart named # Restart named
if [ "$restart" != 'no' ]; then #if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns "$EVENT" # $BIN/v-restart-dns
fi #fi
# Logging # Logging
log_event "$OK" "$EVENT" log_event "$OK" "$EVENT"

View file

@ -70,9 +70,9 @@ fi
# Restart web server # Restart web server
if [ "$restart" != 'no' ]; then if [ "$restart" != 'no' ]; then
$BIN/v-restart-web "$EVENT" $BIN/v-restart-web
$BIN/v-restart-dns "$EVENT" $BIN/v-restart-dns
$BIN/v-restart-cron "$EVENT" $BIN/v-restart-cron
fi fi
# Changing suspend value # Changing suspend value

View file

@ -44,7 +44,7 @@ done
# Restart web server # Restart web server
if [ "$restart" != 'no' ]; then if [ "$restart" != 'no' ]; then
$BIN/v-restart-web "$EVENT" $BIN/v-restart-web
fi fi
# Logging # Logging

View file

@ -48,7 +48,7 @@ sync_cron_jobs
# Restart crond # Restart crond
if [ "$restart" != 'no' ]; then if [ "$restart" != 'no' ]; then
$BIN/v-restart-cron "$EVENT" $BIN/v-restart-cron
fi fi
# Logging # Logging

View file

@ -43,7 +43,7 @@ done
# Restart crond # Restart crond
if [ "$restart" != 'no' ]; then if [ "$restart" != 'no' ]; then
$BIN/v-restart-cron "$EVENT" $BIN/v-restart-cron
fi fi
# Logging # Logging

View file

@ -53,9 +53,9 @@ sed -i "s/SUSPENDED='yes'/SUSPENDED='no'/g" $USER_DATA/dns/$domain.conf
# Restart named # Restart named
if [ "$restart" != 'no' ]; then #if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns "$EVENT" # $BIN/v-restart-dns
fi #fi
# Logging # Logging
log_event "$OK" "$EVENT" log_event "$OK" "$EVENT"

View file

@ -43,9 +43,9 @@ done
#----------------------------------------------------------# #----------------------------------------------------------#
# Restart dns server # Restart dns server
if [ "$restart" != 'no' ]; then #if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns "$EVENT" # $BIN/v-restart-dns
fi #fi
# Logging # Logging
log_event "$OK" "$EVENT" log_event "$OK" "$EVENT"

View file

@ -60,9 +60,9 @@ update_domain_zone
#----------------------------------------------------------# #----------------------------------------------------------#
# Restart named # Restart named
if [ "$restart" != 'no' ]; then #if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns "$EVENT" # $BIN/v-restart-dns
fi #fi
# Logging # Logging
log_event "$OK" "$EVENT" log_event "$OK" "$EVENT"

View file

@ -72,9 +72,9 @@ update_user_value "$user" '$SUSPENDED' 'no'
decrease_user_value 'admin' '$SUSPENDED_USERS' decrease_user_value 'admin' '$SUSPENDED_USERS'
if [ "$restart" != 'no' ]; then if [ "$restart" != 'no' ]; then
$BIN/v-restart-web "$EVENT" $BIN/v-restart-web
$BIN/v-restart-dns "$EVENT" $BIN/v-restart-dns
$BIN/v-restart-cron "$EVENT" $BIN/v-restart-cron
fi fi
# Logging # Logging

View file

@ -45,7 +45,7 @@ done
# Restart web server # Restart web server
if [ "$restart" != 'no' ]; then if [ "$restart" != 'no' ]; then
$BIN/v-restart-web "$EVENT" $BIN/v-restart-web
fi fi
# Logging # Logging