Merge branch 'master' into madeITBelgium-patch-1

This commit is contained in:
Made I.T 2017-02-14 10:55:00 +01:00 committed by GitHub
commit ab32c4b4c4
257 changed files with 8396 additions and 1574 deletions

View file

@ -15,15 +15,8 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | sed -e 's/\.*$//g' -e 's/^\.*//g')
if [[ "$domain" =~ [[:upper:]] ]]; then
domain=$(echo "$domain" |tr '[:upper:]' '[:lower:]')
fi
domain_idn="$domain"
if [[ "$domain" = *[![:ascii:]]* ]]; then
domain_idn=$(idn -t --quiet -a $domain)
fi
domain=$2
domain_idn=$2
ip=$3
ns1=$4
ns2=$5
@ -40,6 +33,10 @@ source $VESTA/func/main.sh
source $VESTA/func/domain.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #
@ -56,37 +53,35 @@ template=$(get_user_value '$DNS_TEMPLATE')
is_dns_template_valid $template
if [ ! -z "$ns1" ]; then
ns1=$(echo $4 | sed -e 's/\.*$//g' -e 's/^\.*//g')
ns1=$(echo $4 |sed -e 's/\.*$//g' -e 's/^\.*//g')
is_format_valid 'ns1'
fi
if [ ! -z "$ns2" ]; then
ns2=$(echo $5 | sed -e 's/\.*$//g' -e 's/^\.*//g')
ns2=$(echo $5 |sed -e 's/\.*$//g' -e 's/^\.*//g')
is_format_valid 'ns2'
fi
if [ ! -z "$ns3" ]; then
ns3=$(echo $6 | sed -e 's/\.*$//g' -e 's/^\.*//g')
ns3=$(echo $6 |sed -e 's/\.*$//g' -e 's/^\.*//g')
is_format_valid 'ns3'
fi
if [ ! -z "$ns4" ]; then
ns4=$(echo $7 | sed -e 's/\.*$//g' -e 's/^\.*//g')
ns4=$(echo $7 |sed -e 's/\.*$//g' -e 's/^\.*//g')
is_format_valid 'ns4'
fi
if [ ! -z "$ns5" ]; then
ns5=$(echo $8 | sed -e 's/\.*$//g' -e 's/^\.*//g')
ns5=$(echo $8 |sed -e 's/\.*$//g' -e 's/^\.*//g')
is_format_valid 'ns5'
fi
if [ ! -z "$ns6" ]; then
ns6=$(echo $9 | sed -e 's/\.*$//g' -e 's/^\.*//g')
ns6=$(echo $9 |sed -e 's/\.*$//g' -e 's/^\.*//g')
is_format_valid 'ns6'
fi
if [ ! -z "$ns7" ]; then
ns7=$(echo ${10} | sed -e 's/\.*$//g' -e 's/^\.*//g')
ns7=$(echo ${10} |sed -e 's/\.*$//g' -e 's/^\.*//g')
is_format_valid 'ns7'
fi
if [ ! -z "$ns8" ]; then
ns8=$(echo ${11} | sed -e 's/\.*$//g' -e 's/^\.*//g')
ns8=$(echo ${11} |sed -e 's/\.*$//g' -e 's/^\.*//g')
is_format_valid 'ns8'
fi
@ -203,10 +198,8 @@ increase_user_value "$user" '$U_DNS_DOMAINS'
increase_user_value "$user" '$U_DNS_RECORDS' "$records"
# Restart named
if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns
check_result $? "DNS restart failed"
fi
$BIN/v-restart-dns $restart
check_result $? "DNS restart failed"
# Logging
log_history "added dns domain $domain"

View file

@ -26,11 +26,6 @@ if [ -z "$priority" ]; then
priority=10
fi
domain_idn="$domain"
if [[ "$domain" = *[![:ascii:]]* ]]; then
domain_idn=$(idn -t --quiet -a $domain)
fi
# Includes
source $VESTA/func/main.sh
source $VESTA/func/domain.sh
@ -44,7 +39,7 @@ fi
# Add trailing dot at the end of NS/CNAME/MX/PTR/SRV record
if [[ $rtype =~ NS|CNAME|MX|PTR|SRV ]]; then
trailing_dot=$(echo $dvalue | grep "\.$")
if [ -z $trailing_dot ]; then
if [ -z "$trailing_dot" ]; then
dvalue="$dvalue."
fi
fi
@ -55,6 +50,10 @@ if [[ "$dvalue" =~ [\;[:space:]] ]]; then
dvalue='"'"$dvalue"'"'
fi
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #
@ -110,6 +109,16 @@ if [ ! -z "$DNS_CLUSTER" ]; then
fi
fi
# remove trailing dot at the end of NS/CNAME/MX/PTR/SRV record
if [[ $rtype =~ NS|CNAME|MX|PTR|SRV ]]; then
trailing_dot2=$(echo $record | grep "\.$")
if [ ! -z $trailing_dot2 ]; then
record=$(echo "${record::-1}")
fi
fi
#----------------------------------------------------------#
# Vesta #
@ -121,10 +130,8 @@ update_object_value 'dns' 'DOMAIN' "$domain" '$RECORDS' "$records"
increase_user_value "$user" '$U_DNS_RECORDS'
# Restart named
if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns
check_result $? $E_RESTART 'dns failed to restart'
fi
$BIN/v-restart-dns $restart
check_result $? $E_RESTART 'dns failed to restart'
# Logging
log_history "added $rtype dns record $record for $domain"

View file

@ -64,16 +64,14 @@ if [ ! -z "$MAIL_SYSTEM" ]; then
fi
# Restarting services
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web
check_result $? "can't restart web" > /dev/null
if [ ! -z "$PROXY_SYSTEM" ]; then
$BIN/v-restart-proxy
check_result $? "can't restart proxy" > /dev/null
fi
$BIN/v-restart-dns
check_result $? "can't restart dns" > /dev/null
fi
$BIN/v-restart-web $restart
check_result $? "can't restart web" > /dev/null
$BIN/v-restart-proxy $restart
check_result $? "can't restart proxy" > /dev/null
$BIN/v-restart-dns $restart
check_result $? "can't restart dns" > /dev/null
#----------------------------------------------------------#

View file

@ -51,6 +51,7 @@ get_domain_values 'web'
# Registering LetsEncrypt user account
$BIN/v-add-letsencrypt-user $user
if [ "$?" -ne 0 ]; then
touch $VESTA/data/queue/letsencrypt.pipe
sed -i "/ $domain /d" $VESTA/data/queue/letsencrypt.pipe
send_notice "LETSENCRYPT" "Account registration failed"
check_result $E_CONNECT "LE account registration" >/dev/null
@ -65,6 +66,7 @@ i=1
for alias in $(echo $domain,$aliases |tr ',' '\n' |sort -u); do
$BIN/v-check-letsencrypt-domain $user $alias
if [ "$?" -ne 0 ]; then
touch $VESTA/data/queue/letsencrypt.pipe
sed -i "/ $domain /d" $VESTA/data/queue/letsencrypt.pipe
send_notice "LETSENCRYPT" "$alias validation failed"
check_result $E_INVALID "LE domain validation" >/dev/null
@ -72,6 +74,7 @@ for alias in $(echo $domain,$aliases |tr ',' '\n' |sort -u); do
# Checking LE limits per account
if [ "$i" -gt 100 ]; then
touch $VESTA/data/queue/letsencrypt.pipe
sed -i "/ $domain /d" $VESTA/data/queue/letsencrypt.pipe
send_notice 'LETSENCRYPT' 'Limit of domains per account is reached'
check_result $E_LIMIT "LE can't sign more than 100 domains"
@ -86,6 +89,7 @@ ssl_dir=$($BIN/v-generate-ssl-cert "$domain" "$email" "US" "California" \
# Signing CSR
crt=$($BIN/v-sign-letsencrypt-csr $user $domain $ssl_dir)
if [ "$?" -ne 0 ]; then
touch $VESTA/data/queue/letsencrypt.pipe
sed -i "/ $domain /d" $VESTA/data/queue/letsencrypt.pipe
send_notice "LETSENCRYPT" "$alias validation failed"
check_result "$E_INVALID" "LE $domain validation"
@ -107,6 +111,7 @@ fi
$BIN/v-delete-web-domain-ssl $user $domain >/dev/null 2>&1
$BIN/v-add-web-domain-ssl $user $domain $ssl_dir
if [ "$?" -ne '0' ]; then
touch $VESTA/data/queue/letsencrypt.pipe
sed -i "/ $domain /d" $VESTA/data/queue/letsencrypt.pipe
send_notice 'LETSENCRYPT' "$domain certificate installation failed"
check_result $? "SSL install" >/dev/null
@ -141,6 +146,7 @@ fi
send_notice 'LETSENCRYPT' "$domain SSL has been installed successfully"
# Deleteing task from queue
touch $VESTA/data/queue/letsencrypt.pipe
sed -i "/ $domain /d" $VESTA/data/queue/letsencrypt.pipe
# Logging

View file

@ -11,10 +11,8 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
domain_idn=$(idn -t --quiet -a "$domain")
account=$(echo $3 | tr '[:upper:]' '[:lower:]')
domain=$2
account=$3
password=$4; HIDE=4
quota=${5-unlimited}
@ -23,6 +21,11 @@ source $VESTA/func/main.sh
source $VESTA/func/domain.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
if [[ "$account" =~ [[:upper:]] ]]; then
account=$(echo "$account" |tr '[:upper:]' '[:lower:]')
fi
#----------------------------------------------------------#
# Verifications #

View file

@ -11,9 +11,7 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
domain_idn=$(idn -t --quiet -a "$domain")
domain=$2
account=$3
malias=$4
@ -22,6 +20,10 @@ source $VESTA/func/main.sh
source $VESTA/func/domain.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #

View file

@ -11,9 +11,7 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
domain_idn=$(idn -t --quiet -a "$domain")
domain=$2
account=$3
autoreply=$4
@ -29,6 +27,10 @@ else
MAIL_USER=exim
fi
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #

View file

@ -11,9 +11,7 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
domain_idn=$(idn -t --quiet -a "$domain")
domain=$2
account=$3
forward=$4
@ -22,6 +20,10 @@ source $VESTA/func/main.sh
source $VESTA/func/domain.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #

View file

@ -11,9 +11,7 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
domain_idn=$(idn -t --quiet -a "$domain")
domain=$2
account=$3
# Includes
@ -28,6 +26,10 @@ else
MAIL_USER=exim
fi
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #

View file

@ -11,15 +11,7 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | sed -e 's/\.*$//g' -e 's/^\.*//g')
if [[ "$domain" =~ [[:upper:]] ]]; then
domain=$(echo "$domain" |tr '[:upper:]' '[:lower:]')
fi
domain_idn="$domain"
if [[ "$domain" = *[![:ascii:]]* ]]; then
domain_idn=$(idn -t --quiet -a $domain)
fi
domain=$2
antispam=${3-yes}
antivirus=${4-yes}
dkim=${5-yes}
@ -37,6 +29,10 @@ else
MAIL_USER=exim
fi
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #
@ -123,10 +119,10 @@ if [ ! -z "$DNS_SYSTEM" ] && [ "$dkim" = 'yes' ]; then
p=$(cat $USER_DATA/mail/$domain.pub|grep -v ' KEY---'|tr -d '\n')
record='_domainkey'
policy="\"t=y; o=~;\""
$BIN/v-add-dns-record $user $domain $record TXT "$policy"
$BIN/v-add-dns-record $user $domain $record TXT "$policy" '' '' 'no'
record='mail._domainkey'
selector="\"k=rsa\; p=$p\""
selector="\"v=DKIM1\; k=rsa\; p=$p\""
$BIN/v-add-dns-record $user $domain $record TXT "$selector"
fi
fi

View file

@ -11,15 +11,17 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
domain_idn=$(idn -t --quiet -a "$domain")
domain=$2
# Includes
source $VESTA/func/main.sh
source $VESTA/func/domain.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #

View file

@ -11,15 +11,17 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
domain_idn=$(idn -t --quiet -a "$domain")
domain=$2
# Includes
source $VESTA/func/main.sh
source $VESTA/func/domain.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #

View file

@ -11,9 +11,7 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
domain_idn=$(idn -t --quiet -a "$domain")
domain=$2
email="$3"
# Includes
@ -21,6 +19,10 @@ source $VESTA/func/main.sh
source $VESTA/func/domain.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #

View file

@ -11,9 +11,7 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
domain_idn=$(idn -t --quiet -a "$domain")
domain=$2
dkim_size=${3-1024}
# Includes
@ -28,6 +26,10 @@ else
MAIL_USER=exim
fi
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #
@ -63,12 +65,12 @@ fi
# Adding dns records
if [ ! -z "$DNS_SYSTEM" ] && [ -e "$USER_DATA/dns/$domain.conf" ]; then
p=$(cat $USER_DATA/mail/$domain.pub |grep -v ' KEY---' |tr -d '\n')
record="_domainkey.$domain_idn"
record="_domainkey"
policy="\"t=y; o=~;\""
$BIN/v-add-dns-record $user $domain $record TXT "$policy"
$BIN/v-add-dns-record $user $domain $record TXT "$policy" '' '' 'no'
record="mail._domainkey.$domain_idn"
selector="\"k=rsa\; p=$p\""
record="mail._domainkey"
selector="\"v=DKIM1\; k=rsa\; p=$p\""
$BIN/v-add-dns-record $user $domain $record TXT "$selector"
fi
@ -79,7 +81,7 @@ fi
# Adding dkim in config
update_object_value 'mail' 'DOMAIN' "$domain" '$DKIM' 'yes'
increase_user_value "$user" '$U_MAIL_DKMI'
increase_user_value "$user" '$U_MAIL_DKIM'
# Logging
log_history "enabled DKIM support for $domain"

View file

@ -45,6 +45,7 @@ fi
# Enabling jailed sftp
if [ -z "$sftp_i" ]; then
echo " " >> $config
echo "Subsystem sftp internal-sftp" >> $config
echo "Match Group sftp-only" >> $config
echo "ChrootDirectory /chroot/%u" >> $config

View file

@ -18,37 +18,23 @@
# Argument definition
user=$1
domain=$2
domain_idn=$2
ip=$3
restart=$4 # will be moved to the end soon
aliases=$5
proxy_ext=$6
# Additional argument formatting
if [[ "$domain" =~ [[:upper:]] ]]; then
domain=$(echo "$domain" |tr '[:upper:]' '[:lower:]')
fi
if [[ "$domain" =~ ^www\..* ]]; then
domain=$(echo "$domain" |sed -e "s/^www.//")
fi
if [[ "$domain" =~ .*\.$ ]]; then
domain=$(echo "$domain" |sed -e "s/\.$//")
fi
domain_idn="$domain"
if [[ "$domain" = *[![:ascii:]]* ]]; then
domain_idn=$(idn -t --quiet -a $domain)
fi
if [ ! -z "$aliases" ] && [ "$aliases" != 'none' ]; then
aliases=$(echo $aliases |tr '[:upper:]' '[:lower:]' |tr ',' '\n')
aliases=$(echo "$aliases" |sed -e "s/\.$//" |sort -u |grep -v www.$domain)
aliases=$(echo "$aliases" |sed -e "/^$/d" |tr '\n' ',' |sed -e "s/,$//")
fi
# Includes
source $VESTA/func/main.sh
source $VESTA/func/domain.sh
source $VESTA/func/ip.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
format_domain_idn
format_aliases
#----------------------------------------------------------#
# Verifications #
@ -178,10 +164,8 @@ $BIN/v-restart-web $restart
check_result $? "Web restart failed" >/dev/null
# Restarting proxy server
if [ ! -z "$PROXY_SYSTEM" ]; then
$BIN/v-restart-proxy $restart
check_result $? "Proxy restart failed" >/dev/null
fi
$BIN/v-restart-proxy $restart
check_result $? "Proxy restart failed" >/dev/null
# Logging
log_history "added web domain $domain"

View file

@ -12,13 +12,8 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
domain_idn=$(idn -t --quiet -a "$domain")
dom_alias=$(idn -t --quiet -u "$3" )
dom_alias=$(echo $dom_alias | sed -e 's/\.*$//g' -e 's/^\.*//g')
dom_alias=$(echo $dom_alias | tr '[:upper:]' '[:lower:]')
dom_alias_idn=$(idn -t --quiet -a "$dom_alias" )
domain=$2
aliases=$3
restart="$4"
# Includes
@ -27,6 +22,11 @@ source $VESTA/func/domain.sh
source $VESTA/func/ip.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
format_domain_idn
format_aliases
#----------------------------------------------------------#
# Verifications #
@ -39,7 +39,7 @@ is_object_valid 'user' 'USER' "$user"
is_object_unsuspended 'user' 'USER' "$user"
is_object_valid 'web' 'DOMAIN' "$domain"
is_object_unsuspended 'web' 'DOMAIN' "$domain"
is_domain_new 'web' "$dom_alias"
is_domain_new 'web' "$aliases"
is_package_full 'WEB_ALIASES'
@ -53,9 +53,9 @@ get_domain_values 'web'
# Preparing domain values for the template substitution
local_ip=$(get_real_ip $IP)
if [ -z "$ALIAS" ]; then
ALIAS="$dom_alias"
ALIAS="$aliases"
else
ALIAS="$ALIAS,$dom_alias"
ALIAS="$ALIAS,$aliases"
fi
prepare_web_domain_values
@ -87,17 +87,15 @@ update_object_value 'web' 'DOMAIN' "$domain" '$ALIAS' "$ALIAS"
increase_user_value "$user" '$U_WEB_ALIASES'
# Restarting web server
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web
check_result $? "Web restart failed" >/dev/null
$BIN/v-restart-web $restart
check_result $? "Web restart failed" >/dev/null
if [ ! -z "$PROXY_SYSTEM" ]; then
$BIN/v-restart-proxy
check_result $? "Proxy restart failed" >/dev/null
fi
fi
# Restarting proxy server
$BIN/v-restart-proxy $restart
check_result $? "Proxy restart failed" >/dev/null
log_history "added $dom_alias as alias for $domain"
log_history "added $aliases for $domain"
log_event "$OK" "$ARGUMENTS"
exit

View file

@ -67,10 +67,8 @@ cat $WEBTPL/$WEB_BACKEND/$template.tpl |\
#----------------------------------------------------------#
# Restart backend server
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web-backend
check_result $? "Web backend restart failed" >/dev/null
fi
$BIN/v-restart-web-backend $restart
check_result $? "Web backend restart failed" >/dev/null
# Logging
log_history "added $WEB_BACKEND backend configuration for $domain"

View file

@ -11,8 +11,7 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
domain=$2
ftp_user=${1}_${3}
password=$4; HIDE=4
ftp_path=$5
@ -22,6 +21,10 @@ source $VESTA/func/main.sh
source $VESTA/func/domain.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #

View file

@ -72,10 +72,8 @@ update_object_value 'web' 'DOMAIN' "$domain" '$PROXY' "$template"
update_object_value 'web' 'DOMAIN' "$domain" '$PROXY_EXT' "$extentions"
# Restarting web server
if [ "$restart" != 'no' ]; then
$BIN/v-restart-proxy
check_result $? "Proxy restart failed" >/dev/null
fi
$BIN/v-restart-proxy $restart
check_result $? "Proxy restart failed" >/dev/null
log_history "enabled proxy support for $domain"
log_event "$OK" "$ARGUMENTS"

View file

@ -16,18 +16,35 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
domain=$2
ssl_dir=$3
ssl_home=${4-same}
restart="$5"
# Additional argument formatting
if [[ "$domain" =~ [[:upper:]] ]]; then
domain=$(echo "$domain" |tr '[:upper:]' '[:lower:]')
fi
if [[ "$domain" =~ ^www\..* ]]; then
domain=$(echo "$domain" |sed -e "s/^www.//")
fi
if [[ "$domain" =~ .*\.$ ]]; then
domain=$(echo "$domain" |sed -e "s/\.$//")
fi
domain=$(idn -t --quiet -u "$domain" )
domain_idn=$(idn -t --quiet -a "$domain")
# Includes
source $VESTA/func/main.sh
source $VESTA/func/domain.sh
source $VESTA/func/ip.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #
@ -97,15 +114,11 @@ update_object_value 'web' 'DOMAIN' "$domain" '$SSL_HOME' "$SSL_HOME"
update_object_value 'web' 'DOMAIN' "$domain" '$SSL' "yes"
# Restarting web server
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web
check_result $? "Web restart failed" >/dev/null
$BIN/v-restart-web $restart
check_result $? "Web restart failed" >/dev/null
if [ ! -z "$PROXY_SYSTEM" ]; then
$BIN/v-restart-proxy
check_result $? "Proxy restart failed" >/dev/null
fi
fi
$BIN/v-restart-proxy $restart
check_result $? "Proxy restart failed" >/dev/null
# Logging
log_history "enabled ssl support for $domain"

View file

@ -15,8 +15,7 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
domain=$2
type=$3
# Includes
@ -24,6 +23,10 @@ source $VESTA/func/main.sh
source $VESTA/func/domain.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #

View file

@ -137,7 +137,7 @@ if [ ! -z "$WEB_SYSTEM" ] && [ "$WEB" != '*' ]; then
mkdir -p $tmpdir/web/$domain/vesta
# Get domain variables
domain_idn=$(idn -t --quiet -a "$domain")
format_domain_idn
get_domain_values 'web'
# Backup web.conf
@ -286,7 +286,7 @@ if [ ! -z "$MAIL_SYSTEM" ] && [ "$MAIL" != '*' ]; then
echo -e "$(date "+%F %T") $domain" |tee -a $BACKUP/$user.log
mkdir -p $tmpdir/mail/$domain/conf
mkdir -p $tmpdir/mail/$domain/vesta
domain_idn=$(idn -t --quiet -a "$domain")
format_domain_idn
# Backup exim config
if [[ "$MAIL_SYSTEM" =~ exim ]]; then

View file

@ -12,14 +12,17 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
domain=$2
exp=$3
# Includes
source $VESTA/func/main.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #

View file

@ -11,8 +11,7 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
domain=$2
ip=$3
restart=$4
@ -21,6 +20,10 @@ source $VESTA/func/main.sh
source $VESTA/func/domain.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #
@ -71,10 +74,8 @@ fi
#----------------------------------------------------------#
# Restarting named
if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns
check_result $? "DNS restart failed" >/dev/null
fi
$BIN/v-restart-dns $restart
check_result $? "DNS restart failed" >/dev/null
# Logging
log_history "changed dns ip for $domain to $ip"

View file

@ -12,8 +12,7 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
domain=$2
soa=$(echo $3 | sed -e 's/\.*$//g' -e 's/^\.*//g')
restart=$4
@ -22,6 +21,10 @@ source $VESTA/func/main.sh
source $VESTA/func/domain.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #
@ -65,10 +68,8 @@ fi
#----------------------------------------------------------#
# Restarting named
if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns
check_result $? "DNS restart failed" >/dev/null
fi
$BIN/v-restart-dns $restart
check_result $? "DNS restart failed" >/dev/null
# Logging
log_history "changed soa record for $domain to $soa"

View file

@ -13,20 +13,19 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$2
template=$3
restart=$4
domain_idn="$domain"
if [[ "$domain" = *[![:ascii:]]* ]]; then
domain_idn=$(idn -t --quiet -a $domain)
fi
# Includes
source $VESTA/func/main.sh
source $VESTA/func/domain.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #
@ -121,10 +120,8 @@ update_object_value 'dns' 'DOMAIN' "$domain" '$TPL' "$template"
update_object_value 'dns' 'DOMAIN' "$domain" '$RECORDS' "$records"
# Restarting named
if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns
check_result $? "DNS restart failed" >/dev/null
fi
$BIN/v-restart-dns $restart
check_result $? "DNS restart failed" >/dev/null
# Logging
log_history "changed dns template for $domain to $template" '' 'admin'

View file

@ -11,8 +11,7 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
domain=$2
ttl=$3
restart=$4
@ -21,6 +20,10 @@ source $VESTA/func/main.sh
source $VESTA/func/domain.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #
@ -64,10 +67,8 @@ fi
#----------------------------------------------------------#
# Restarting named
if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns
check_result $? "DNS restart failed" >/dev/null
fi
$BIN/v-restart-dns $restart
check_result $? "DNS restart failed" >/dev/null
# Logging
log_history "changed TTL for $domain to $ttl"

View file

@ -11,22 +11,21 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$2
id=$3
dvalue=$(idn -t --quiet -u "$4" )
priority=$5
restart=$6
domain_idn="$domain"
if [[ "$domain" = *[![:ascii:]]* ]]; then
domain_idn=$(idn -t --quiet -a $domain)
fi
# Includes
source $VESTA/func/main.sh
source $VESTA/func/domain.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #
@ -105,10 +104,8 @@ fi
#----------------------------------------------------------#
# Restarting named
if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns
check_result $? "DNS restart failed" >/dev/null
fi
$BIN/v-restart-dns $restart
check_result $? "DNS restart failed" >/dev/null
# Logging
log_history "changed dns record on $domain to $dvalue"

View file

@ -11,9 +11,7 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
domain_idn=$(idn -t --quiet -a "$domain")
domain=$2
id=$3
newid=$4
restart=$5
@ -23,6 +21,10 @@ source $VESTA/func/main.sh
source $VESTA/func/domain.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #
@ -71,10 +73,8 @@ fi
#----------------------------------------------------------#
# Restarting named
if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns
check_result $? "DNS restart failed" >/dev/null
fi
$BIN/v-restart-dns $restart
check_result $? "DNS restart failed" >/dev/null
# Logging
log_history "changed dns record id on $domain"

View file

@ -148,6 +148,18 @@ if [ ! -z "$mail_data" ]; then
$BIN/v-unsuspend-mail-domain $user $domain no >> /dev/null 2>&1
$BIN/v-rebuild-mail-domains $owner no
$BIN/v-rebuild-mail-domains $user
# Checking exim username for later chowning
exim_user="exim";
check_exim_username=$(grep -c '^Debian-exim:' /etc/passwd)
if [ "$check_exim_username" -eq 1 ]; then
exim_user="Debian-exim"
fi
# Chowning mail conf files to exim user
if [ -d "$HOMEDIR/$user/conf/mail/$domain" ]; then
find $HOMEDIR/$user/conf/mail/$domain -user root \
-exec chown $exim_user {} \;
fi
fi
# Update counters

View file

@ -11,9 +11,7 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
domain_idn=$(idn -t --quiet -a "$domain")
domain=$2
account=$3
password=$4; HIDE=4
@ -22,6 +20,10 @@ source $VESTA/func/main.sh
source $VESTA/func/domain.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #

View file

@ -11,9 +11,7 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
domain_idn=$(idn -t --quiet -a "$domain")
domain=$2
account=$3
quota=$4
@ -22,6 +20,10 @@ source $VESTA/func/main.sh
source $VESTA/func/domain.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #

View file

@ -11,16 +11,18 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
domain_idn=$(idn -t --quiet -a "$domain")
email="$3"
domain=$2
email=$3
# Includes
source $VESTA/func/main.sh
source $VESTA/func/domain.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #
@ -53,7 +55,6 @@ fi
# Change catchall in config
update_object_value 'mail' 'DOMAIN' "$domain" '$CATCHALL' "$email"
# Logging
log_history "changed catchall email for $domain to $email"
log_event "$OK" "$ARGUMENTS"

View file

@ -73,10 +73,8 @@ fi
#----------------------------------------------------------#
# Restart ftp server
if [ "$restart" != 'no' ]; then
$BIN/v-restart-ftp
check_result $? "FTP restart failed" >/dev/null
fi
$BIN/v-restart-ftp $restart
check_result $? "FTP restart failed" >/dev/null
# Logging
log_history "changed associated nat address on $ip to $nat_ip" '' 'admin'

View file

@ -43,7 +43,7 @@ is_package_avalable() {
check_result $E_LIMIT "Package doesn't cover WEB_DOMAIN usage"
fi
fi
if [ "$DNS_DOMAINS" ! = 'unlimited' ]; then
if [ "$DNS_DOMAINS" != 'unlimited' ]; then
if [ "$DNS_DOMAINS" -lt "$U_DNS_DOMAINS" ]; then
check_result $E_LIMIT "Package doesn't cover DNS_DOMAIN usage"
fi

View file

@ -11,11 +11,9 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
domain=$2
template=$3
restart="$4"
restart=$4
# Includes
source $VESTA/func/main.sh
@ -23,6 +21,10 @@ source $VESTA/func/domain.sh
source $VESTA/func/ip.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #
@ -143,13 +145,11 @@ fi
# Restarting web
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web
check_result $? "Web restart failed" >/dev/null
$BIN/v-restart-web $restart
check_result $? "Web restart failed" >/dev/null
$BIN/v-restart-web-backend
check_result $? "Web backend restart failed" >/dev/null
fi
$BIN/v-restart-web-backend $restart
check_result $? "Web backend restart failed" >/dev/null
# Logging
log_history "changed backend template for $domain to $template"

View file

@ -11,8 +11,7 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
domain=$2
ftp_user=$3
password=$4; HIDE=4
@ -21,6 +20,10 @@ source $VESTA/func/main.sh
source $VESTA/func/domain.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #

View file

@ -11,8 +11,7 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
domain=$2
ftp_user=$3
ftp_path=$4
@ -21,6 +20,10 @@ source $VESTA/func/main.sh
source $VESTA/func/domain.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #

View file

@ -21,6 +21,10 @@ source $VESTA/func/domain.sh
source $VESTA/func/ip.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #
@ -44,12 +48,6 @@ is_ip_valid "$ip" "$user"
get_domain_values 'web'
old=$(get_real_ip $IP)
new=$ip
if [[ "$domain" = *[![:ascii:]]* ]]; then
domain_idn=$(idn -t --quiet -a $domain)
else
domain_idn=$domain
fi
# Replacing vhost
replace_web_config "$WEB_SYSTEM" "$TPL.tpl"
@ -78,15 +76,11 @@ decrease_ip_value "$old"
update_object_value 'web' 'DOMAIN' "$domain" '$IP' "$3"
# Restart web server
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web
check_result $? "WEB restart failed" >/dev/null
$BIN/v-restart-web $restart
check_result $? "WEB restart failed" >/dev/null
if [ ! -z "$PROXY_SYSTEM" ]; then
$BIN/v-restart-proxy
check_result $? "Proxy restart failed" >/dev/null
fi
fi
$BIN/v-restart-proxy $restart
check_result $? "Proxy restart failed" >/dev/null
# Logging
log_history "changed web domain $domain ip to $3"

View file

@ -15,17 +15,16 @@ domain=$2
new_domain=$3
restart=$4
domain_idn="$domain"
if [[ "$domain" = *[![:ascii:]]* ]]; then
domain_idn=$(idn -t --quiet -a $domain)
fi
# Includes
source $VESTA/func/main.sh
source $VESTA/func/domain.sh
source $VESTA/func/ip.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #

View file

@ -11,21 +11,23 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
domain=$2
template=$3
default_extentions="jpg,jpeg,gif,png,ico,svg,css,zip,tgz,gz,rar,bz2,doc,xls,\
exe,pdf,ppt,txt,odt,ods,odp,odf,tar,wav,bmp,rtf,js,mp3,avi,mpeg,flv,html,htm"
extentions=${4-$default_extentions}
restart="$5"
# Includes
source $VESTA/func/main.sh
source $VESTA/func/domain.sh
source $VESTA/func/ip.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #
@ -75,10 +77,8 @@ update_object_value 'web' 'DOMAIN' "$domain" '$PROXY' "$PROXY"
update_object_value 'web' 'DOMAIN' "$domain" '$PROXY_EXT' "$extentions"
# Restarting proxy
if [ "$restart" != 'no' ]; then
$BIN/v-restart-proxy
check_result $? "Proxy restart failed" >/dev/null
fi
$BIN/v-restart-proxy $restart
check_result $? "Proxy restart failed" >/dev/null
# Logging
log_history "changed proxy template for $domain to $template"

View file

@ -12,8 +12,7 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
domain=$2
ssl_dir=$3
restart=$4
@ -22,6 +21,10 @@ source $VESTA/func/main.sh
source $VESTA/func/domain.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #
@ -71,15 +74,11 @@ fi
#----------------------------------------------------------#
# Restarting web server
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web
check_result $? "Web restart failed" >/dev/null
$BIN/v-restart-web $restart
check_result $? "Web restart failed" >/dev/null
if [ ! -z "$PROXY_SYSTEM" ]; then
$BIN/v-restart-proxy
check_result $? "Proxy restart failed" >/dev/null
fi
fi
$BIN/v-restart-proxy $restart
check_result $? "Proxy restart failed" >/dev/null
# Logging
log_history "changed ssl certificate for $domain"

View file

@ -7,8 +7,7 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
domain=$2
ssl_home=$3
restart=$4
@ -17,6 +16,10 @@ source $VESTA/func/main.sh
source $VESTA/func/domain.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #
@ -67,15 +70,11 @@ fi
update_object_value 'web' 'DOMAIN' "$domain" '$SSL_HOME' "$SSL_HOME"
# Restarting web server
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web
check_result $? "Web restart failed" >/dev/null
$BIN/v-restart-web $restart
check_result $? "Web restart failed" >/dev/null
if [ ! -z "$PROXY_SYSTEM" ]; then
$BIN/v-restart-proxy
check_result $? "Proxy restart failed" >/dev/null
fi
fi
$BIN/v-restart-proxy $restart
check_result $? "Proxy restart failed" >/dev/null
# Logging
log_history "changed ssl home for $domain to $ssl_home"

View file

@ -12,8 +12,7 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
domain=$2
type=$3
# Includes
@ -21,6 +20,10 @@ source $VESTA/func/main.sh
source $VESTA/func/domain.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #

View file

@ -12,8 +12,7 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
domain=$2
template=$3
restart=$4
@ -23,6 +22,10 @@ source $VESTA/func/domain.sh
source $VESTA/func/ip.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #
@ -68,10 +71,8 @@ fi
update_object_value 'web' 'DOMAIN' "$domain" '$TPL' "$template"
# Restarting web
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web
check_result $? "Web restart failed" >/dev/null
fi
$BIN/v-restart-web $restart
check_result $? "Web restart failed" >/dev/null
# Logging
log_history "changed web domain template for $domain to $template" '' 'admin'

View file

@ -97,7 +97,10 @@ if [ "$WEB_SYSTEM" = 'nginx' ] || [ "$PROXY_SYSTEM" = 'nginx' ]; then
fi
else
acme="$HOMEDIR/$user/web/$r_domain/public_html/.well-known/acme-challenge"
echo "$token" > $acme/$token.$thumb
if [ ! -d "$acme" ]; then
mkdir -p $acme
fi
echo "$token.$thumb" > $acme/$token
chown -R $user:$user $HOMEDIR/$user/web/$r_domain/public_html/.well-known
fi

View file

@ -72,10 +72,8 @@ decrease_user_value "$user" '$U_DNS_DOMAINS'
decrease_user_value "$user" '$U_DNS_RECORDS' "$records"
# Restarting named
if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns $restart
check_result $? "Bind restart failed" >/dev/null
fi
$BIN/v-restart-dns $restart
check_result $? "Bind restart failed" >/dev/null
# Logging
log_history "deleted dns domain $domain"

View file

@ -43,10 +43,8 @@ done
#----------------------------------------------------------#
# Restarting named
if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns
check_result $? "Bind restart failed" >/dev/null
fi
$BIN/v-restart-dns $restart
check_result $? "Bind restart failed" >/dev/null
# Logging
log_event "$OK" "$ARGUMENTS"

View file

@ -44,10 +44,8 @@ done
#----------------------------------------------------------#
# Restart named
if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns
check_result $? "Bind restart failed" >/dev/null
fi
$BIN/v-restart-dns $restart
check_result $? "Bind restart failed" >/dev/null
# Logging
log_event "$OK" "$ARGUMENTS"

View file

@ -11,11 +11,10 @@
# Argument definition
user=$1
domain=$(echo $2 | sed -e 's/\.*$//g' -e 's/^\.*//g')
domain_idn=$(idn -t --quiet -a "$domain")
domain=$2
dom_alias=$(idn -t --quiet -u "$3" )
dom_alias=$(echo $dom_alias | sed -e 's/\.*$//g' -e 's/^\.*//g')
dom_alias=$(echo $dom_alias | tr '[:upper:]' '[:lower:]')
dom_alias=$(echo $dom_alias |sed -e 's/\.*$//g' -e 's/^\.*//g')
dom_alias=$(echo $dom_alias |tr '[:upper:]' '[:lower:]')
dom_alias_idn=$(idn -t --quiet -a "$dom_alias" )
restart="$4"
@ -24,6 +23,10 @@ source $VESTA/func/main.sh
source $VESTA/func/domain.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #
@ -63,7 +66,7 @@ else
fi
if [ ! -z "$rec" ]; then
eval "$rec"
$BIN/v-delete-dns-record $user "$root" "$ID"
$BIN/v-delete-dns-record $user "$root" "$ID" $restart
fi
fi
fi

View file

@ -11,8 +11,7 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
domain=$2
id=$3
restart=$4
@ -21,6 +20,10 @@ source $VESTA/func/main.sh
source $VESTA/func/domain.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #
@ -70,10 +73,8 @@ update_object_value 'dns' 'DOMAIN' "$domain" '$RECORDS' "$records"
decrease_user_value "$user" '$U_DNS_RECORDS'
# Restarting named
if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns
check_result $? "Bind restart failed" >/dev/null
fi
$BIN/v-restart-dns $restart
check_result $? "Bind restart failed" >/dev/null
# Logging
log_history "deleted dns record $id on $domain"

View file

@ -69,16 +69,14 @@ if [ -z "$domain_found" ]; then
fi
# Restarting services
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web
check_result $? "can't restart web" > /dev/null
if [ ! -z "$PROXY_SYSTEM" ]; then
$BIN/v-restart-proxy
check_result $? "can't restart proxy" > /dev/null
fi
$BIN/v-restart-dns
check_result $? "can't restart dns" > /dev/null
fi
$BIN/v-restart-web $restart
check_result $? "can't restart web" > /dev/null
$BIN/v-restart-proxy $restart
check_result $? "can't restart proxy" > /dev/null
$BIN/v-restart-dns $restart
check_result $? "can't restart dns" > /dev/null
#----------------------------------------------------------#

View file

@ -11,9 +11,7 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
domain_idn=$(idn -t --quiet -a "$domain")
domain=$2
account=$3
# Includes
@ -21,6 +19,10 @@ source $VESTA/func/main.sh
source $VESTA/func/domain.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #

View file

@ -11,9 +11,7 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
domain_idn=$(idn -t --quiet -a "$domain")
domain=$2
account=$3
malias=$4
@ -22,6 +20,10 @@ source $VESTA/func/main.sh
source $VESTA/func/domain.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #

View file

@ -11,9 +11,7 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
domain_idn=$(idn -t --quiet -a "$domain")
domain=$2
account=$3
malias=$4
@ -22,6 +20,10 @@ source $VESTA/func/main.sh
source $VESTA/func/domain.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #

View file

@ -11,9 +11,7 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
domain_idn=$(idn -t --quiet -a "$domain")
domain=$2
account=$3
forward=$4
@ -22,6 +20,10 @@ source $VESTA/func/main.sh
source $VESTA/func/domain.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #
@ -38,9 +40,7 @@ is_object_valid "mail/$domain" 'ACCOUNT' "$account"
is_object_unsuspended "mail/$domain" 'ACCOUNT' "$account"
fwd=$(get_object_value "mail/$domain" 'ACCOUNT' "$account" '$FWD')
if [ -z "$(echo $fwd | grep -w $forward)" ]; then
echo "Error: forward $forward doesn't exist"
log_event "$E_NOTEXIST $ARGUMENTS"
exit $E_NOTEXIST
check_result $E_NOTEXIST "forward $forward doesn't exist"
fi

View file

@ -11,9 +11,7 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
domain_idn=$(idn -t --quiet -a "$domain")
domain=$2
account=$3
# Includes
@ -21,6 +19,10 @@ source $VESTA/func/main.sh
source $VESTA/func/domain.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #

View file

@ -12,14 +12,17 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
domain=$2
# Includes
source $VESTA/func/main.sh
source $VESTA/func/domain.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #

View file

@ -11,15 +11,17 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
domain_idn=$(idn -t --quiet -a "$domain")
domain=$2
# Includes
source $VESTA/func/main.sh
source $VESTA/func/domain.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #

View file

@ -11,15 +11,17 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
domain_idn=$(idn -t --quiet -a "$domain")
domain=$2
# Includes
source $VESTA/func/main.sh
source $VESTA/func/domain.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #

View file

@ -11,15 +11,17 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
domain_idn=$(idn -t --quiet -a "$domain")
domain=$2
# Includes
source $VESTA/func/main.sh
source $VESTA/func/domain.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #

View file

@ -61,7 +61,7 @@ fi
# Updatoing config
update_object_value 'mail' 'DOMAIN' "$domain" '$DKIM' 'no'
decrease_user_value "$user" '$U_MAIL_DKMI'
decrease_user_value "$user" '$U_MAIL_DKIM'
# Logging
log_history "disabled DKIM support on $domain"

View file

@ -23,6 +23,10 @@ source $VESTA/func/domain.sh
source $VESTA/func/ip.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #
@ -48,10 +52,6 @@ fi
# Parsing domain values
get_domain_values 'web'
domain_idn="$domain"
if [[ "$domain" = *[![:ascii:]]* ]]; then
domain_idn=$(idn -t --quiet -a $domain)
fi
local_ip=$(get_real_ip $IP)
# Deleting domain from web.conf
@ -121,16 +121,12 @@ if [ ! -z "$ALIAS" ]; then
fi
# Restarting web server
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web
check_result $? "Web restart failed" >/dev/null
$BIN/v-restart-web $restart
check_result $? "Web restart failed" >/dev/null
# Restartinh proxy server
if [ ! -z "$PROXY_SYSTEM" ]; then
$BIN/v-restart-proxy
check_result $? "Proxy restart failed" >/dev/null
fi
fi
# Restartinh proxy server
$BIN/v-restart-proxy $restart
check_result $? "Proxy restart failed" >/dev/null
# Logging
log_history "deleted web domain $domain"

View file

@ -81,15 +81,11 @@ update_object_value 'web' 'DOMAIN' "$domain" '$ALIAS' "$ALIAS"
decrease_user_value "$user" '$U_WEB_ALIASES'
# Restarting web server
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web
check_result $? "Web restart failed" >/dev/null
$BIN/v-restart-web $restart
check_result $? "Web restart failed" >/dev/null
if [ ! -z "$PROXY_SYSTEM" ]; then
$BIN/v-restart-proxy
check_result $? "Proxy restart failed" >/dev/null
fi
fi
$BIN/v-restart-proxy $restart
check_result $? "Proxy restart failed" >/dev/null
# Logging
log_history "deleted alias $dom_alias on $domain"

View file

@ -11,14 +11,17 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
domain=$2
# Includes
source $VESTA/func/main.sh
source $VESTA/func/domain.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #
@ -66,10 +69,8 @@ rm -f $pool/$backend_type.conf
#----------------------------------------------------------#
# Restarting backend server
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web-backend
check_result $? "Backend restart failed" >/dev/null
fi
$BIN/v-restart-web-backend $restart
check_result $? "Backend restart failed" >/dev/null
# Logging
log_history "deleting backend support for $domain"

View file

@ -11,8 +11,7 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
domain=$2
ftp_user=$3
# Includes
@ -20,6 +19,10 @@ source $VESTA/func/main.sh
source $VESTA/func/domain.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #

View file

@ -11,8 +11,7 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
domain=$2
restart=$3
# Includes
@ -20,6 +19,10 @@ source $VESTA/func/main.sh
source $VESTA/func/domain.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #
@ -58,10 +61,8 @@ update_object_value 'web' 'DOMAIN' "$domain" '$PROXY' ''
update_object_value 'web' 'DOMAIN' "$domain" '$PROXY_EXT' ''
# Restart proxy server
if [ "$restart" != 'no' ]; then
$BIN/v-restart-proxy
check_result $? "Proxy restart failed" >/dev/null
fi
$BIN/v-restart-proxy $restart
check_result $? "Proxy restart failed" >/dev/null
# Logging
log_history "disabled proxy support for $domain"

View file

@ -11,8 +11,7 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
domain=$2
restart=$3
# Includes
@ -20,6 +19,10 @@ source $VESTA/func/main.sh
source $VESTA/func/domain.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #
@ -71,15 +74,11 @@ update_object_value 'web' 'DOMAIN' "$domain" '$SSL' 'no'
decrease_user_value "$user" '$U_WEB_SSL'
# Restarting web server
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web
check_result $? "Web restart failed" >/dev/null
$BIN/v-restart-web $restart
check_result $? "Web restart failed" >/dev/null
if [ ! -z "$PROXY_SYSTEM" ]; then
$BIN/v-restart-proxy
check_result $? "Proxy restart failed" >/dev/null
fi
fi
$BIN/v-restart-proxy $restart
check_result $? "Proxy restart failed" >/dev/null
# Logging
log_history "disabled ssl support for $domain"

View file

@ -12,14 +12,17 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
domain=$2
# Includes
source $VESTA/func/main.sh
source $VESTA/func/domain.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #

View file

@ -43,15 +43,11 @@ done
#----------------------------------------------------------#
# Restarting web server
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web
check_result $? "Web restart failed" >/dev/null
$BIN/v-restart-web $restart
check_result $? "Web restart failed" >/dev/null
if [ ! -z "$PROXY_SYSTEM" ]; then
$BIN/v-restart-proxy
check_result $? "Proxy restart failed" >/dev/null
fi
fi
$BIN/v-restart-proxy $restart
check_result $? "Proxy restart failed" >/dev/null
# Logging
log_event "$OK" "$ARGUMENTS"

View file

@ -11,13 +11,16 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
domain=$2
key=$(echo "$3"| tr '[:lower:]' '[:upper:]' | sed "s/^/$/")
# Includes
source $VESTA/func/main.sh
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #

View file

@ -11,14 +11,17 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
domain=$2
account=$3
key=$(echo "$4"| tr '[:lower:]' '[:upper:]' | sed "s/^/$/")
# Includes
source $VESTA/func/main.sh
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #

View file

@ -11,13 +11,16 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
domain=$2
key=$(echo "$3"| tr '[:lower:]' '[:upper:]' | sed "s/^/$/")
# Includes
source $VESTA/func/main.sh
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #

View file

@ -74,10 +74,8 @@ chmod 660 $USER_DATA/dns.conf
#----------------------------------------------------------#
# Restarting named
if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns $restart
check_result $? "Bind restart failed" >/dev/null
fi
$BIN/v-restart-dns $restart
check_result $? "Bind restart failed" >/dev/null
# Logging
log_event "$OK" "$ARGUMENTS"

View file

@ -45,10 +45,8 @@ echo "$data" >> $USER_DATA/dns/$domain.conf
#----------------------------------------------------------#
# Restarting named
if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns $restart
check_result $? "Bind restart failed" >/dev/null
fi
$BIN/v-restart-dns $restart
check_result $? "Bind restart failed" >/dev/null
# Logging
log_event "$OK" "$ARGUMENTS"

View file

@ -48,10 +48,8 @@ fi
#----------------------------------------------------------#
# Restarting named
if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns
check_result $? "Bind restart failed" >/dev/null
fi
$BIN/v-restart-dns $restart
check_result $? "Bind restart failed" >/dev/null
# Logging
log_event "$OK" "$ARGUMENTS"

View file

@ -41,10 +41,8 @@ sync_cron_jobs
#----------------------------------------------------------#
# Restarting crond
if [ "$restart" != 'no' ]; then
$BIN/v-restart-cron
check_result $? "Cron restart failed" >/dev/null
fi
$BIN/v-restart-cron $restart
check_result $? "Cron restart failed" >/dev/null
# Logging
log_event "$OK" "$ARGUMENTS"

View file

@ -82,10 +82,8 @@ update_user_value "$user" '$U_DNS_RECORDS' "$user_records"
update_user_value "$user" '$SUSPENDED_DNS' "$suspended_dns"
# Restarting named
if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns "$restart"
check_result $? "Bind restart failed" >/dev/null
fi
$BIN/v-restart-dns $restart
check_result $? "Bind restart failed" >/dev/null
# Logging
log_event "$OK" "$ARGUMENTS"

View file

@ -83,10 +83,8 @@ update_user_value "$user" '$U_DNS_RECORDS' "$user_records"
update_user_value "$user" '$SUSPENDED_DNS' "$suspended_dns"
# Restarting named
if [ "$restart" != 'no' ]; then
$BIN/v-restart-dns
check_result $? "Bind restart failed" >/dev/null
fi
$BIN/v-restart-dns $restart
check_result $? "Bind restart failed" >/dev/null
# Logging
log_event "$OK" "$ARGUMENTS"

View file

@ -75,15 +75,11 @@ done
$BIN/v-update-user-counters $user
# Restarting web server
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web
check_result $? "Web restart failed" >/dev/null
$BIN/v-restart-web $restart
check_result $? "Web restart failed" >/dev/null
if [ ! -z "$PROXY_SYSTEM" ]; then
$BIN/v-restart-proxy
check_result $? "Proxy restart failed" >/dev/null
fi
fi
$BIN/v-restart-proxy $restart
check_result $? "Proxy restart failed" >/dev/null
# Logging
log_event "$OK" "$ARGUMENTS"

View file

@ -517,6 +517,13 @@ if [ "$mail" != 'no' ] && [ ! -z "$MAIL_SYSTEM" ]; then
domains=$(echo "$backup_domains" |egrep -f $tmpdir/selected.txt)
fi
# Checking exim username for later chowning
exim_user="exim";
check_exim_username=$(grep -c '^Debian-exim:' /etc/passwd)
if [ "$check_exim_username" -eq 1 ]; then
exim_user="Debian-exim"
fi
# Restoring dns domain
for domain in $domains; do
echo -e "$(date "+%F %T") $domain" |tee -a $tmpdir/restore.log
@ -579,6 +586,11 @@ if [ "$mail" != 'no' ] && [ ! -z "$MAIL_SYSTEM" ]; then
-exec chown -h $user:mail {} \;
fi
fi
# Chowning mail conf files to exim user
find $HOMEDIR/$user/conf/mail/$domain_idn -user root \
-exec chown $exim_user {} \;
done
fi

View file

@ -47,10 +47,8 @@ sync_cron_jobs
#----------------------------------------------------------#
# Restarting crond
if [ "$restart" != 'no' ]; then
$BIN/v-restart-cron
check_result $? "Cron restart failed" >/dev/null
fi
$BIN/v-restart-cron $restart
check_result $? "Cron restart failed" >/dev/null
# Logging
log_event "$OK" "$ARGUMENTS"

View file

@ -42,10 +42,8 @@ done
#----------------------------------------------------------#
# Restarting crond
if [ "$restart" != 'no' ]; then
$BIN/v-restart-cron
check_result $? "Cron restart failed" >/dev/null
fi
$BIN/v-restart-cron $restart
check_result $? "Cron restart failed" >/dev/null
# Logging
log_event "$OK" "$ARGUMENTS"

View file

@ -11,14 +11,17 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
domain=$2
restart="$3"
# Includes
source $VESTA/func/main.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #

View file

@ -11,20 +11,19 @@
# Argument definition
user=$1
domain="$2"
domain=$2
id=$3
restart="$4"
domain_idn="$domain"
if [[ "$domain" = *[![:ascii:]]* ]]; then
domain_idn=$(idn -t --quiet -a $domain)
fi
restart=$4
# Includes
source $VESTA/func/main.sh
source $VESTA/func/domain.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #

View file

@ -71,16 +71,14 @@ if [ -z "$domain_found" ]; then
fi
# Restarting services
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web
check_result $? "can't restart web" > /dev/null
if [ ! -z "$PROXY_SYSTEM" ]; then
$BIN/v-restart-proxy
check_result $? "can't restart proxy" > /dev/null
fi
$BIN/v-restart-dns
check_result $? "can't restart dns" > /dev/null
fi
$BIN/v-restart-web $restat
check_result $? "can't restart web" > /dev/null
$BIN/v-restart-proxy $restart
check_result $? "can't restart proxy" > /dev/null
$BIN/v-restart-dns $restart
check_result $? "can't restart dns" > /dev/null
#----------------------------------------------------------#

View file

@ -11,9 +11,7 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
domain_idn=$(idn -t --quiet -a "$domain")
domain=$2
account=$3
# Includes
@ -21,6 +19,10 @@ source $VESTA/func/main.sh
source $VESTA/func/domain.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #

View file

@ -11,14 +11,15 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
domain_idn=$(idn -t --quiet -a "$domain")
domain=$2
# Includes
source $VESTA/func/main.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
#----------------------------------------------------------#
# Verifications #

View file

@ -11,15 +11,17 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
domain_idn=$(idn -t --quiet -a "$domain")
domain=$2
# Includes
source $VESTA/func/main.sh
source $VESTA/func/domain.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #

View file

@ -74,16 +74,14 @@ fi
#----------------------------------------------------------#
# Restarting system services
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web
check_result $? "Web restart failed" >/dev/null
$BIN/v-restart-web $restart
check_result $? "Web restart failed" >/dev/null
$BIN/v-restart-dns
check_result $? "DNS restart failed" >/dev/null
$BIN/v-restart-dns $restart
check_result $? "DNS restart failed" >/dev/null
$BIN/v-restart-cron
check_result $? "Cron restart failed" >/dev/null
fi
$BIN/v-restart-cron $restart
check_result $? "Cron restart failed" >/dev/null
# Changing suspend value
update_user_value "$user" '$SUSPENDED' 'yes'

View file

@ -13,8 +13,7 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
domain=$2
restart=$3
# Includes
@ -23,6 +22,10 @@ source $VESTA/func/domain.sh
source $VESTA/func/ip.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #
@ -76,15 +79,11 @@ update_object_value 'web' 'DOMAIN' "$domain" '$SUSPENDED' 'yes'
increase_user_value "$user" '$SUSPENDED_WEB'
# Restarting web server
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web
check_result $? "Web restart failed" >/dev/null
$BIN/v-restart-web $restart
check_result $? "Web restart failed" >/dev/null
if [ ! -z "$PROXY_SYSTEM" ]; then
$BIN/v-restart-proxy
check_result $? "Proxy restart failed" >/dev/null
fi
fi
$BIN/v-restart-proxy $restart
check_result $? "Proxy restart failed" >/dev/null
# Logging
log_event "$OK" "$ARGUMENTS"

View file

@ -43,15 +43,11 @@ done
#----------------------------------------------------------#
# Restarting web server
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web
check_result $? "Web restart failed" >/dev/null
$BIN/v-restart-web $restart
check_result $? "Web restart failed" >/dev/null
if [ ! -z "$PROXY_SYSTEM" ]; then
$BIN/v-restart-proxy
check_result $? "Proxy restart failed" >/dev/null
fi
fi
$BIN/v-restart-proxy $restart
check_result $? "Proxy restart failed" >/dev/null
# Logging
log_event "$OK" "$ARGUMENTS"

View file

@ -47,10 +47,8 @@ sync_cron_jobs
#----------------------------------------------------------#
# Restarting crond
if [ "$restart" != 'no' ]; then
$BIN/v-restart-cron
check_result $? "Cron restart failed" >/dev/null
fi
$BIN/v-restart-cron $restart
check_result $? "Cron restart failed" >/dev/null
# Logging
log_event "$OK" "$ARGUMENTS"

View file

@ -42,10 +42,8 @@ done
#----------------------------------------------------------#
# Restarting crond
if [ "$restart" != 'no' ]; then
$BIN/v-restart-cron
check_result $? "Cron restart failed" >/dev/null
fi
$BIN/v-restart-cron $restart
check_result $? "Cron restart failed" >/dev/null
# Logging
log_event "$OK" "$ARGUMENTS"

View file

@ -11,14 +11,16 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain_idn=$(idn -t --quiet -a "$domain")
restart="$3"
domain=$2
# Includes
source $VESTA/func/main.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #

View file

@ -13,18 +13,17 @@
user=$1
domain=$2
id=$3
restart="$4"
domain_idn="$domain"
if [[ "$domain" = *[![:ascii:]]* ]]; then
domain_idn=$(idn -t --quiet -a $domain)
fi
restart=$4
# Includes
source $VESTA/func/main.sh
source $VESTA/func/domain.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #

View file

@ -70,16 +70,14 @@ if [ -z "$domain_found" ]; then
fi
# Restarting services
if [ "$restart" != 'no' ]; then
$BIN/v-restart-web
check_result $? "can't restart web" > /dev/null
if [ ! -z "$PROXY_SYSTEM" ]; then
$BIN/v-restart-proxy
check_result $? "can't restart proxy" > /dev/null
fi
$BIN/v-restart-dns
check_result $? "can't restart dns" > /dev/null
fi
$BIN/v-restart-web $restart
check_result $? "can't restart web" > /dev/null
$BIN/v-restart-proxy $restart
check_result $? "can't restart proxy" > /dev/null
$BIN/v-restart-dns $restart
check_result $? "can't restart dns" > /dev/null
#----------------------------------------------------------#

View file

@ -11,9 +11,7 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
domain_idn=$(idn -t --quiet -a "$domain")
domain=$2
account=$3
# Includes
@ -21,6 +19,10 @@ source $VESTA/func/main.sh
source $VESTA/func/domain.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #

View file

@ -11,14 +11,16 @@
# Argument definition
user=$1
domain=$(idn -t --quiet -u "$2" )
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
domain_idn=$(idn -t --quiet -a "$domain")
domain=$2
# Includes
source $VESTA/func/main.sh
source $VESTA/conf/vesta.conf
# Additional argument formatting
format_domain
format_domain_idn
#----------------------------------------------------------#
# Verifications #

Some files were not shown because too many files have changed in this diff Show more