E_RESTART should be a variable

This commit is contained in:
Serghey Rodin 2014-02-19 23:12:23 +02:00
commit 4614df59a7
61 changed files with 89 additions and 89 deletions

View file

@ -75,7 +75,7 @@ increase_user_value $user '$U_CRON_JOBS'
# Restart crond
$BIN/v-restart-cron
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
# Logging

View file

@ -47,7 +47,7 @@ sync_cron_jobs
# Restart crond
$BIN/v-restart-cron
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
# Logging

View file

@ -163,7 +163,7 @@ increase_user_value "$user" '$U_DNS_RECORDS' "$records"
if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
fi

View file

@ -108,7 +108,7 @@ increase_user_value "$user" '$U_DNS_RECORDS'
if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
fi

View file

@ -153,11 +153,11 @@ fi
# Restart web server
$BIN/v-restart-web
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
$BIN/v-restart-proxy
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
# Logging

View file

@ -177,7 +177,7 @@ chmod 660 $USER_DATA/web.conf
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
fi

View file

@ -104,12 +104,12 @@ increase_user_value "$user" '$U_WEB_ALIASES'
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
$BIN/v-restart-proxy
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
fi

View file

@ -104,7 +104,7 @@ update_object_value 'web' 'DOMAIN' "$domain" '$PROXY_EXT' "$extentions"
if [ "$restart" != 'no' ]; then
$BIN/v-restart-proxy
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
fi

View file

@ -127,12 +127,12 @@ update_object_value 'web' 'DOMAIN' "$domain" '$SSL' "yes"
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
$BIN/v-restart-proxy
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
fi

View file

@ -66,7 +66,7 @@ sync_cron_jobs
# Restart crond
$BIN/v-restart-cron
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
# Logging

View file

@ -71,7 +71,7 @@ fi
if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
fi

View file

@ -65,7 +65,7 @@ fi
if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
fi

View file

@ -89,7 +89,7 @@ fi
if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
fi

View file

@ -64,7 +64,7 @@ fi
if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
fi

View file

@ -99,7 +99,7 @@ fi
if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
fi

View file

@ -71,7 +71,7 @@ fi
if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
fi

View file

@ -78,7 +78,7 @@ fi
if [ "$restart" != 'no' ]; then
$BIN/v-restart-ftp
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
fi

View file

@ -88,12 +88,12 @@ update_object_value 'web' 'DOMAIN' "$domain" '$IP' "$3"
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
$BIN/v-restart-proxy
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
fi

View file

@ -95,7 +95,7 @@ update_object_value 'web' 'DOMAIN' "$domain" '$PROXY_EXT' "$extentions"
if [ "$restart" != 'no' ]; then
$BIN/v-restart-proxy
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
fi

View file

@ -72,12 +72,12 @@ fi
# Restart web server
$BIN/v-restart-web
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
$BIN/v-restart-proxy
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
# Logging

View file

@ -72,12 +72,12 @@ update_object_value 'web' 'DOMAIN' "$domain" '$SSL_HOME' "$SSL_HOME"
# Restart web server
$BIN/v-restart-web
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
$BIN/v-restart-proxy
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
# Logging

View file

@ -97,7 +97,7 @@ update_object_value 'web' 'DOMAIN' "$domain" '$TPL' "$template"
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
fi

View file

@ -55,7 +55,7 @@ decrease_user_value "$user" '$U_CRON_JOBS'
# Restart crond
$BIN/v-restart-cron
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
# Logging

View file

@ -47,7 +47,7 @@ sync_cron_jobs
# Restart crond
$BIN/v-restart-cron
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
# Logging

View file

@ -76,7 +76,7 @@ decrease_user_value "$user" '$U_DNS_RECORDS' "$records"
if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns $restart
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
fi

View file

@ -44,7 +44,7 @@ done
# Restart named
$BIN/v-restart-dns
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
# Logging

View file

@ -47,7 +47,7 @@ done
if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
fi

View file

@ -70,7 +70,7 @@ decrease_user_value "$user" '$U_DNS_RECORDS'
if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
fi

View file

@ -39,7 +39,7 @@ if [ ! -z "$WEB_SYSTEM" ] && [ "$WEB_SYSTEM" != 'no' ]; then
if [ ! -z "$check_web" ]; then
$BIN/v-delete-web-domain $user $domain
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
fi
fi
@ -50,7 +50,7 @@ if [ ! -z "$DNS_SYSTEM" ] && [ "$DNS_SYSTEM" != 'no' ]; then
if [ ! -z "$check_dns" ]; then
$BIN/v-delete-dns-domain $user $domain
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
fi
fi
@ -61,7 +61,7 @@ if [ ! -z "$MAIL_SYSTEM" ] && [ "$MAIL_SYSTEM" != 'no' ]; then
if [ ! -z "$check_mail" ]; then
$BIN/v-delete-mail-domain $user $domain
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
fi
fi

View file

@ -122,12 +122,12 @@ fi
# Adding task to the vesta pipe
$BIN/v-restart-web
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
$BIN/v-restart-proxy
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
# Logging

View file

@ -155,12 +155,12 @@ fi
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
$BIN/v-restart-proxy
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
fi

View file

@ -102,12 +102,12 @@ decrease_user_value "$user" '$U_WEB_ALIASES'
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
$BIN/v-restart-proxy
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
fi

View file

@ -88,7 +88,7 @@ fi
if [ "$restart" != 'no' ]; then
$BIN/v-restart-proxy
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
fi

View file

@ -93,12 +93,12 @@ decrease_user_value "$user" '$U_WEB_SSL'
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
$BIN/v-restart-proxy
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
fi

View file

@ -46,12 +46,12 @@ done
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
$BIN/v-restart-proxy
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
fi

View file

@ -73,7 +73,7 @@ chmod 660 $USER_DATA/dns.conf
if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns $restart
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
fi

View file

@ -48,7 +48,7 @@ echo "$data" >> $USER_DATA/dns/$domain.conf
if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns $restart
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
fi

View file

@ -51,7 +51,7 @@ fi
if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
fi

View file

@ -44,7 +44,7 @@ sync_cron_jobs
if [ "$restart" != 'no' ]; then
$BIN/v-restart-cron
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
fi

View file

@ -79,7 +79,7 @@ update_user_value "$user" '$SUSPENDED_DNS' "$suspended_dns"
if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns "$restart"
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
fi

View file

@ -79,7 +79,7 @@ update_user_value "$user" '$SUSPENDED_DNS' "$suspended_dns"
if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
fi

View file

@ -150,12 +150,12 @@ update_user_value "$user" '$U_WEB_ALIASES' "$user_aliases"
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
$BIN/v-restart-proxy
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
fi

View file

@ -373,12 +373,12 @@ if [ "$web" != 'no' ]; then
# Restart WEB
$BIN/v-restart-web
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
$BIN/v-restart-proxy
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
echo
@ -491,7 +491,7 @@ if [ "$dns" != 'no' ]; then
# Restart DNS
$BIN/v-restart-dns
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
echo
@ -708,7 +708,7 @@ if [ "$cron" != 'no' ]; then
# Restart cron
$BIN/v-restart-cron
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
echo

View file

@ -50,7 +50,7 @@ sync_cron_jobs
if [ "$restart" != 'no' ]; then
$BIN/v-restart-cron
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
fi

View file

@ -45,7 +45,7 @@ done
if [ "$restart" != 'no' ]; then
$BIN/v-restart-cron
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
fi

View file

@ -50,7 +50,7 @@ increase_user_value "$user" '$SUSPENDED_DNS'
#if [ "$restart" != 'no' ]; then
# $BIN/v-restart-dns
# if [ $? -ne 0 ]; then
# exit E_RESTART
# exit $E_RESTART
# fi
#fi

View file

@ -46,7 +46,7 @@ done
#if [ "$restart" != 'no' ]; then
# $BIN/v-restart-dns
# if [ $? -ne 0 ]; then
# exit E_RESTART
# exit $E_RESTART
# fi
#fi

View file

@ -64,7 +64,7 @@ update_domain_zone
#if [ "$restart" != 'no' ]; then
# $BIN/v-restart-dns
# if [ $? -ne 0 ]; then
# exit E_RESTART
# exit $E_RESTART
# fi
#fi

View file

@ -72,17 +72,17 @@ fi
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
$BIN/v-restart-dns
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
$BIN/v-restart-cron
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
fi

View file

@ -92,12 +92,12 @@ increase_user_value "$user" '$SUSPENDED_WEB'
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
$BIN/v-restart-proxy
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
fi

View file

@ -46,12 +46,12 @@ done
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
$BIN/v-restart-proxy
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
fi

View file

@ -50,7 +50,7 @@ sync_cron_jobs
if [ "$restart" != 'no' ]; then
$BIN/v-restart-cron
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
fi

View file

@ -45,7 +45,7 @@ done
if [ "$restart" != 'no' ]; then
$BIN/v-restart-cron
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
fi

View file

@ -52,7 +52,7 @@ sed -i "s/SUSPENDED='yes'/SUSPENDED='no'/g" $USER_DATA/dns/$domain.conf
#if [ "$restart" != 'no' ]; then
# $BIN/v-restart-dns
# if [ $? -ne 0 ]; then
# exit E_RESTART
# exit $E_RESTART
# fi
#fi

View file

@ -46,7 +46,7 @@ done
#if [ "$restart" != 'no' ]; then
# $BIN/v-restart-dns
# if [ $? -ne 0 ]; then
# exit E_RESTART
# exit $E_RESTART
# fi
#fi

View file

@ -63,7 +63,7 @@ update_domain_zone
#if [ "$restart" != 'no' ]; then
# $BIN/v-restart-dns
# if [ $? -ne 0 ]; then
# exit E_RESTART
# exit $E_RESTART
# fi
#fi

View file

@ -74,17 +74,17 @@ decrease_user_value 'admin' '$SUSPENDED_USERS'
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
$BIN/v-restart-dns
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
$BIN/v-restart-cron
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
fi

View file

@ -89,12 +89,12 @@ decrease_user_value "$user" '$SUSPENDED_WEB'
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
$BIN/v-restart-proxy
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
fi

View file

@ -47,12 +47,12 @@ done
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
$BIN/v-restart-proxy
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
fi

View file

@ -54,7 +54,7 @@ if [ ! -z "$vst_ip_list" ] && [ "$vst_ip_num" -eq '1' ]; then
sed -i "s/$old/$new/g" /etc/$PROXY_SYSTEM/conf.d/$new.conf
$BIN/v-restart-proxy
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
fi
if [ ! -z "$WEB_SYSTEM" ]; then
@ -69,7 +69,7 @@ if [ ! -z "$vst_ip_list" ] && [ "$vst_ip_num" -eq '1' ]; then
done
$BIN/v-restart-web
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
fi
@ -82,7 +82,7 @@ if [ ! -z "$vst_ip_list" ] && [ "$vst_ip_num" -eq '1' ]; then
done
$BIN/v-restart-dns
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
fi

View file

@ -65,12 +65,12 @@ done
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
$BIN/v-restart-proxy
if [ $? -ne 0 ]; then
exit E_RESTART
exit $E_RESTART
fi
fi