mirror of
https://github.com/myvesta/vesta
synced 2025-08-19 13:01:52 -07:00
new improved template scheme
This commit is contained in:
parent
14687f170a
commit
fd4e68bb8c
96 changed files with 1395 additions and 1425 deletions
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# info: add dns domain
|
# info: add dns domain
|
||||||
# options: USER DOMAIN IP [TEMPLATE] [NS1] [NS2] [NS3] [NS4] [RESTART]
|
# options: USER DOMAIN IP [NS1] [NS2] [NS3] [NS4] [RESTART]
|
||||||
#
|
#
|
||||||
# The function adds DNS zone with records defined in the template. If the exp
|
# The function adds DNS zone with records defined in the template. If the exp
|
||||||
# argument isn't stated, the expiration date value will be set to next year.
|
# argument isn't stated, the expiration date value will be set to next year.
|
||||||
|
@ -20,12 +20,11 @@ domain=$(echo $domain | sed -e 's/\.*$//g' -e 's/^\.*//g')
|
||||||
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
|
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
|
||||||
domain_idn=$(idn -t --quiet -a "$domain")
|
domain_idn=$(idn -t --quiet -a "$domain")
|
||||||
ip=$3
|
ip=$3
|
||||||
template=$4
|
ns1=$4
|
||||||
ns1=$5
|
ns2=$5
|
||||||
ns2=$6
|
ns3=$6
|
||||||
ns3=$7
|
ns4=$7
|
||||||
ns4=$8
|
restart=$8
|
||||||
restart=$9
|
|
||||||
|
|
||||||
# Includes
|
# Includes
|
||||||
source $VESTA/conf/vesta.conf
|
source $VESTA/conf/vesta.conf
|
||||||
|
@ -37,36 +36,32 @@ source $VESTA/func/domain.sh
|
||||||
# Verifications #
|
# Verifications #
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
|
||||||
check_args '3' "$#" 'USER DOMAIN IP [TEMPLATE] [NS1] [NS2] [NS3] [NS4]'
|
check_args '3' "$#" 'USER DOMAIN IP [NS1] [NS2] [NS3] [NS4]'
|
||||||
validate_format 'user' 'domain' 'ip'
|
validate_format 'user' 'domain' 'ip'
|
||||||
is_system_enabled "$DNS_SYSTEM"
|
is_system_enabled "$DNS_SYSTEM"
|
||||||
is_object_valid 'user' 'USER' "$user"
|
is_object_valid 'user' 'USER' "$user"
|
||||||
is_object_unsuspended 'user' 'USER' "$user"
|
is_object_unsuspended 'user' 'USER' "$user"
|
||||||
is_domain_new 'dns'
|
is_domain_new 'dns'
|
||||||
is_package_full 'DNS_DOMAINS'
|
is_package_full 'DNS_DOMAINS'
|
||||||
if [ ! -z "$template" ]; then
|
|
||||||
validate_format 'template'
|
template=$(get_user_value '$DNS_TEMPLATE')
|
||||||
is_dns_template_valid
|
is_dns_template_valid
|
||||||
else
|
|
||||||
template=$(get_user_value '$TEMPLATE')
|
|
||||||
is_dns_template_valid
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ ! -z "$ns1" ]; then
|
if [ ! -z "$ns1" ]; then
|
||||||
ns1=$(echo $5 | sed -e 's/\.*$//g' -e 's/^\.*//g')
|
ns1=$(echo $4 | sed -e 's/\.*$//g' -e 's/^\.*//g')
|
||||||
validate_format 'ns1'
|
validate_format 'ns1'
|
||||||
fi
|
fi
|
||||||
if [ ! -z "$ns2" ]; then
|
if [ ! -z "$ns2" ]; then
|
||||||
ns2=$(echo $6 | sed -e 's/\.*$//g' -e 's/^\.*//g')
|
ns2=$(echo $5 | sed -e 's/\.*$//g' -e 's/^\.*//g')
|
||||||
validate_format 'ns2'
|
validate_format 'ns2'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ ! -z "$ns3" ]; then
|
if [ ! -z "$ns3" ]; then
|
||||||
ns3=$(echo $7 | sed -e 's/\.*$//g' -e 's/^\.*//g')
|
ns3=$(echo $6 | sed -e 's/\.*$//g' -e 's/^\.*//g')
|
||||||
validate_format 'ns3'
|
validate_format 'ns3'
|
||||||
fi
|
fi
|
||||||
if [ ! -z "$ns4" ]; then
|
if [ ! -z "$ns4" ]; then
|
||||||
ns4=$(echo $8 | sed -e 's/\.*$//g' -e 's/^\.*//g')
|
ns4=$(echo $7 | sed -e 's/\.*$//g' -e 's/^\.*//g')
|
||||||
validate_format 'ns4'
|
validate_format 'ns4'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -75,7 +70,7 @@ fi
|
||||||
# Action #
|
# Action #
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
|
||||||
# Defining variables
|
# Defining NS variables
|
||||||
if [ -z $ns2 ]; then
|
if [ -z $ns2 ]; then
|
||||||
i=1
|
i=1
|
||||||
ns=$(get_user_value '$NS')
|
ns=$(get_user_value '$NS')
|
||||||
|
@ -88,7 +83,6 @@ soa="$ns1"
|
||||||
exp=$(date +%F -d "+ 1 year")
|
exp=$(date +%F -d "+ 1 year")
|
||||||
ttl=14400
|
ttl=14400
|
||||||
|
|
||||||
|
|
||||||
# Adding zone to dns dir
|
# Adding zone to dns dir
|
||||||
cat $DNSTPL/$template.tpl |\
|
cat $DNSTPL/$template.tpl |\
|
||||||
sed -e "s/%ip%/$ip/g" \
|
sed -e "s/%ip%/$ip/g" \
|
||||||
|
|
|
@ -58,7 +58,7 @@ else
|
||||||
dom=$(echo "$dom_alias" | sed -e "s/^$sub.//" )
|
dom=$(echo "$dom_alias" | sed -e "s/^$sub.//" )
|
||||||
if [ ! -e "$USER_DATA/dns/$dom.conf" ]; then
|
if [ ! -e "$USER_DATA/dns/$dom.conf" ]; then
|
||||||
$BIN/v-add-dns-domain \
|
$BIN/v-add-dns-domain \
|
||||||
$user $dom $IP '' '' '' '' '' $restart > /dev/null
|
$user $dom $IP '' '' '' '' $restart > /dev/null
|
||||||
|
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
$BIN/v-add-dns-domain-record \
|
$BIN/v-add-dns-domain-record \
|
||||||
|
|
|
@ -51,9 +51,11 @@ fi
|
||||||
if [ ! -z "$WEB_SYSTEM" ] && [ "$WEB_SYSTEM" != 'no' ]; then
|
if [ ! -z "$WEB_SYSTEM" ] && [ "$WEB_SYSTEM" != 'no' ]; then
|
||||||
$BIN/v-add-web-domain $user $domain $ip
|
$BIN/v-add-web-domain $user $domain $ip
|
||||||
retun_code=$?
|
retun_code=$?
|
||||||
if [ "$PROXY_SYSTEM" = 'nginx' ] && [ "$retun_code" -eq 0 ]; then
|
fi
|
||||||
$BIN/v-add-web-domain-nginx $user $domain
|
|
||||||
fi
|
# Proxy support
|
||||||
|
if [ ! -z "$PROXY_SYSTEM" ] && [ "$retun_code" -eq 0 ]; then
|
||||||
|
$BIN/v-add-web-domain-proxy $user $domain
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# DNS domain
|
# DNS domain
|
||||||
|
|
|
@ -19,7 +19,7 @@ ip=${1// /}
|
||||||
mask=$2
|
mask=$2
|
||||||
interface="${3-eth0}"
|
interface="${3-eth0}"
|
||||||
user="${4-admin}"
|
user="${4-admin}"
|
||||||
ip_status="${5-shared}" # can be dedicated as well
|
ip_status="${5-shared}" # status can be dedicated
|
||||||
ip_name=$6
|
ip_name=$6
|
||||||
nat_ip=$7
|
nat_ip=$7
|
||||||
|
|
||||||
|
@ -50,27 +50,64 @@ fi
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
# Action #
|
# Action #
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
|
||||||
# Get full interface name
|
|
||||||
get_ip_iface
|
get_ip_iface
|
||||||
|
sys_ip_check=$(/sbin/ifconfig | grep "addr:$ip ")
|
||||||
|
if [ -z "$sys_ip_check" ]; then
|
||||||
|
/sbin/ifconfig "$iface" "$ip" netmask "$mask"
|
||||||
|
|
||||||
# Defining config paths
|
# Adding startup script
|
||||||
conf='/etc/httpd/conf.d/vesta.conf'
|
sys_ip="# Added by vesta"
|
||||||
nconf='/etc/nginx/conf.d/vesta_ip.conf'
|
sys_ip="$sys_ip\nDEVICE=$iface"
|
||||||
iconf='/etc/sysconfig/network-scripts/ifcfg'
|
sys_ip="$sys_ip\nBOOTPROTO=static"
|
||||||
rconf='/etc/httpd/conf.d/mod_extract_forwarded.conf'
|
sys_ip="$sys_ip\nONBOOT=yes"
|
||||||
|
sys_ip="$sys_ip\nIPADDR=$ip"
|
||||||
# Adding ip
|
sys_ip="$sys_ip\nNETMASK=$mask"
|
||||||
/sbin/ifconfig "$iface" "$ip" netmask "$mask"
|
echo -e $sys_ip > /etc/sysconfig/network-scripts/ifcfg-$iface
|
||||||
|
fi
|
||||||
# Adding startup script
|
|
||||||
create_ip_startup
|
|
||||||
|
|
||||||
# Adding vesta ip
|
# Adding vesta ip
|
||||||
create_vesta_ip
|
echo "OWNER='$user'
|
||||||
|
STATUS='$ip_status'
|
||||||
|
NAME='$ip_name'
|
||||||
|
U_SYS_USERS=''
|
||||||
|
U_WEB_DOMAINS='0'
|
||||||
|
INTERFACE='$interface'
|
||||||
|
NETMASK='$mask'
|
||||||
|
NAT='$nat_ip'
|
||||||
|
TIME='$TIME'
|
||||||
|
DATE='$DATE'" > $VESTA/data/ips/$ip
|
||||||
|
chmod 660 $VESTA/data/ips/$ip
|
||||||
|
|
||||||
# Namehosting support
|
# WEB support
|
||||||
namehost_ip_support
|
web_conf="/etc/$WEB_SYSTEM/conf.d/vesta.conf"
|
||||||
|
if [ "$WEB_SYSTEM" = 'httpd' ]; then
|
||||||
|
conf_ins='1'
|
||||||
|
conf_line=$(grep -n NameVirtual $web_conf | tail -n1 | cut -f1 -d:)
|
||||||
|
if [ ! -z "$conf_line" ]; then
|
||||||
|
conf_ins=$((conf_line + 1))
|
||||||
|
fi
|
||||||
|
if [ "$WEB_SSL" = 'mod_ssl' ]; then
|
||||||
|
sed -i "$conf_ins i NameVirtualHost $ip:$WEB_SSL_PORT" $web_conf
|
||||||
|
sed -i "$conf_ins i Listen $ip:$WEB_SSL_PORT" $web_conf
|
||||||
|
fi
|
||||||
|
sed -i "$conf_ins i NameVirtualHost $ip:$WEB_PORT" $web_conf
|
||||||
|
sed -i "$conf_ins i Listen $ip:$WEB_PORT" $web_conf
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Proxy support
|
||||||
|
if [ ! -z "$PROXY_SYSTEM" ]; then
|
||||||
|
cat $WEBTPL/$PROXY_SYSTEM/proxy_ip.tpl |\
|
||||||
|
sed -e "s/%ip%/$ip/g" \
|
||||||
|
-e "s/%web_port%/$WEB_PORT/g" \
|
||||||
|
-e "s/%proxy_port%/$PROXY_PORT/g" \
|
||||||
|
> /etc/$PROXY_SYSTEM/conf.d/$ip.conf
|
||||||
|
|
||||||
|
fw_conf="/etc/$WEB_SYSTEM/conf.d/mod_extract_forwarded.conf"
|
||||||
|
if [ -e "$fw_conf" ]; then
|
||||||
|
ips=$(grep 'MEFaccept ' $fw_conf | grep -v '#' | head -n1)
|
||||||
|
sed -i "s/$ips/$ips $ip/g" $fw_conf
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
@ -93,9 +130,8 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Restart web server
|
# Restart web server
|
||||||
if [ "$web_restart" = 'yes' ]; then
|
$BIN/v-restart-web
|
||||||
$BIN/v-restart-web "$EVENT"
|
$BIN/v-restart-proxy
|
||||||
fi
|
|
||||||
|
|
||||||
# Logging
|
# Logging
|
||||||
log_history "added system ip address $ip" '' 'admin'
|
log_history "added system ip address $ip" '' 'admin'
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# info: add web domain
|
# info: add web domain
|
||||||
# options: USER DOMAIN IP [TEMPLATE] [RESTART]
|
# options: USER DOMAIN IP [RESTART]
|
||||||
#
|
#
|
||||||
# The function adds virtual host to a server. In cases when a template is
|
# The function adds virtual host to a server. In cases when a template is
|
||||||
# undefined in the script, the template "default" will be used. The alias of
|
# undefined in the script, the template "default" will be used. The alias of
|
||||||
|
@ -21,8 +21,7 @@ domain=$(echo $domain | sed -e 's/\.*$//g' -e 's/^\.*//g')
|
||||||
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
|
domain=$(echo $domain | tr '[:upper:]' '[:lower:]')
|
||||||
domain_idn=$(idn -t --quiet -a "$domain")
|
domain_idn=$(idn -t --quiet -a "$domain")
|
||||||
ip=$3
|
ip=$3
|
||||||
template=$4
|
restart=$4
|
||||||
restart=$5
|
|
||||||
|
|
||||||
# Includes
|
# Includes
|
||||||
source $VESTA/conf/vesta.conf
|
source $VESTA/conf/vesta.conf
|
||||||
|
@ -35,7 +34,7 @@ source $VESTA/func/ip.sh
|
||||||
# Verifications #
|
# Verifications #
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
|
||||||
check_args '3' "$#" 'USER DOMAIN IP [TEMPLATE] [RESTART]'
|
check_args '3' "$#" 'USER DOMAIN IP [RESTART]'
|
||||||
validate_format 'user' 'domain' 'ip'
|
validate_format 'user' 'domain' 'ip'
|
||||||
is_system_enabled "$WEB_SYSTEM"
|
is_system_enabled "$WEB_SYSTEM"
|
||||||
is_object_valid 'user' 'USER' "$user"
|
is_object_valid 'user' 'USER' "$user"
|
||||||
|
@ -44,13 +43,9 @@ is_domain_new 'web'
|
||||||
is_ip_valid
|
is_ip_valid
|
||||||
is_ip_avalable
|
is_ip_avalable
|
||||||
is_package_full 'WEB_DOMAINS'
|
is_package_full 'WEB_DOMAINS'
|
||||||
if [ ! -z "$template" ]; then
|
|
||||||
validate_format 'template'
|
template=$(get_user_value '$WEB_TEMPLATE')
|
||||||
is_apache_template_valid
|
is_web_template_valid
|
||||||
else
|
|
||||||
template=$(get_user_value '$TEMPLATE')
|
|
||||||
is_apache_template_valid
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
@ -82,10 +77,10 @@ fi
|
||||||
group="$user"
|
group="$user"
|
||||||
email="$user@$domain"
|
email="$user@$domain"
|
||||||
docroot="$HOMEDIR/$user/web/$domain/public_html"
|
docroot="$HOMEDIR/$user/web/$domain/public_html"
|
||||||
conf="$HOMEDIR/$user/conf/web/httpd.conf"
|
tpl_file="$WEBTPL/$WEB_SYSTEM/$template.tpl"
|
||||||
tpl_file="$WEBTPL/apache/$template.tpl"
|
conf="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.conf"
|
||||||
|
|
||||||
# Adding domain to the httpd.conf
|
# Adding web config
|
||||||
add_web_config
|
add_web_config
|
||||||
|
|
||||||
# Building directory tree
|
# Building directory tree
|
||||||
|
@ -99,12 +94,13 @@ mkdir -p $HOMEDIR/$user/web/$domain \
|
||||||
$HOMEDIR/$user/web/$domain/logs
|
$HOMEDIR/$user/web/$domain/logs
|
||||||
|
|
||||||
# Adding domain logs
|
# Adding domain logs
|
||||||
touch /var/log/httpd/domains/$domain.bytes \
|
touch /var/log/$WEB_SYSTEM/domains/$domain.bytes \
|
||||||
/var/log/httpd/domains/$domain.log \
|
/var/log/$WEB_SYSTEM/domains/$domain.log \
|
||||||
/var/log/httpd/domains/$domain.error.log
|
/var/log/$WEB_SYSTEM/domains/$domain.error.log
|
||||||
|
|
||||||
# Adding symlink for logs
|
# Adding symlink for logs
|
||||||
ln -f -s /var/log/httpd/domains/$domain.*log $HOMEDIR/$user/web/$domain/logs/
|
ln -f -s /var/log/$WEB_SYSTEM/domains/$domain.*log \
|
||||||
|
$HOMEDIR/$user/web/$domain/logs/
|
||||||
|
|
||||||
# Adding domain skeleton
|
# Adding domain skeleton
|
||||||
if [ -e "$WEBTPL/skel/public_html/" ]; then
|
if [ -e "$WEBTPL/skel/public_html/" ]; then
|
||||||
|
@ -127,11 +123,11 @@ done
|
||||||
|
|
||||||
# Changing file owner
|
# Changing file owner
|
||||||
chown -R $user:$user $HOMEDIR/$user/web/$domain
|
chown -R $user:$user $HOMEDIR/$user/web/$domain
|
||||||
chown root:$user /var/log/httpd/domains/$domain.*
|
chown root:$user /var/log/$WEB_SYSTEM/domains/$domain.*
|
||||||
chown root:apache $conf
|
chown root:$user $conf
|
||||||
|
|
||||||
# Changing file permissions
|
# Changing file permissions
|
||||||
chmod 660 $conf
|
chmod 640 $conf
|
||||||
chmod 551 $HOMEDIR/$user/web/$domain
|
chmod 551 $HOMEDIR/$user/web/$domain
|
||||||
chmod 751 $HOMEDIR/$user/web/$domain/private
|
chmod 751 $HOMEDIR/$user/web/$domain/private
|
||||||
chmod 751 $HOMEDIR/$user/web/$domain/cgi-bin
|
chmod 751 $HOMEDIR/$user/web/$domain/cgi-bin
|
||||||
|
@ -143,18 +139,17 @@ chmod -f -R 665 $HOMEDIR/$user/web/$domain/public_html/*
|
||||||
chmod -f -R 665 $HOMEDIR/$user/web/$domain/document_errors/*
|
chmod -f -R 665 $HOMEDIR/$user/web/$domain/document_errors/*
|
||||||
chmod 551 $HOMEDIR/$user/web/$domain/stats
|
chmod 551 $HOMEDIR/$user/web/$domain/stats
|
||||||
chmod 551 $HOMEDIR/$user/web/$domain/logs
|
chmod 551 $HOMEDIR/$user/web/$domain/logs
|
||||||
chmod 640 /var/log/httpd/domains/$domain.*
|
chmod 640 /var/log/$WEB_SYSTEM/domains/$domain.*
|
||||||
|
|
||||||
# Running template trigger
|
# Running template trigger
|
||||||
if [ -x $WEBTPL/apache/$template.sh ]; then
|
if [ -x $WEBTPL/$WEB_SYSTEM/$template.sh ]; then
|
||||||
$WEBTPL/apache/$template.sh $user $domain $ip $HOMEDIR $docroot
|
$WEBTPL/$WEB_SYSTEM/$template.sh $user $domain $ip $HOMEDIR $docroot
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Checking main vesta httpd config
|
# Checking web config
|
||||||
main_conf='/etc/httpd/conf.d/vesta.conf'
|
web_conf="/etc/$WEB_SYSTEM/conf.d/vesta.conf"
|
||||||
main_conf_check=$(grep "$conf" $main_conf )
|
if [ -z "$(grep $conf $web_conf)" ]; then
|
||||||
if [ -z "$main_conf_check" ]; then
|
echo "Include $conf" >> $web_conf
|
||||||
echo "Include $conf" >>$main_conf
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
@ -170,7 +165,7 @@ increase_user_value "$user" '$U_WEB_ALIASES'
|
||||||
# Defining domain variables
|
# Defining domain variables
|
||||||
str="DOMAIN='$domain' IP='$IP' IP6='' ALIAS='$aliases' TPL='$template'"
|
str="DOMAIN='$domain' IP='$IP' IP6='' ALIAS='$aliases' TPL='$template'"
|
||||||
str="$str SSL='no' SSL_HOME='same' FTP_USER='' FTP_MD5=''"
|
str="$str SSL='no' SSL_HOME='same' FTP_USER='' FTP_MD5=''"
|
||||||
str="$str NGINX='' NGINX_EXT='' STATS='' STATS_USER=''"
|
str="$str PROXY='' PROXY_EXT='' STATS='' STATS_USER=''"
|
||||||
str="$str STATS_CRYPT='' U_DISK='0' U_BANDWIDTH='0' SUSPENDED='no'"
|
str="$str STATS_CRYPT='' U_DISK='0' U_BANDWIDTH='0' SUSPENDED='no'"
|
||||||
str="$str TIME='$TIME' DATE='$DATE'"
|
str="$str TIME='$TIME' DATE='$DATE'"
|
||||||
|
|
||||||
|
@ -180,7 +175,7 @@ chmod 660 $USER_DATA/web.conf
|
||||||
|
|
||||||
# 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
|
||||||
|
|
|
@ -49,8 +49,8 @@ is_package_full 'WEB_ALIASES'
|
||||||
|
|
||||||
# Parsing domain values
|
# Parsing domain values
|
||||||
get_domain_values 'web'
|
get_domain_values 'web'
|
||||||
tpl_file="$WEBTPL/apache/$TPL.tpl"
|
tpl_file="$WEBTPL/$WEB_SYSTEM/$TPL.tpl"
|
||||||
conf="$HOMEDIR/$user/conf/web/httpd.conf"
|
conf="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.conf"
|
||||||
ip=$(get_real_ip $IP)
|
ip=$(get_real_ip $IP)
|
||||||
|
|
||||||
# Parsing domain aliases
|
# Parsing domain aliases
|
||||||
|
@ -68,22 +68,22 @@ del_web_config
|
||||||
add_web_config
|
add_web_config
|
||||||
|
|
||||||
if [ "$SSL" = 'yes' ]; then
|
if [ "$SSL" = 'yes' ]; then
|
||||||
tpl_file="$WEBTPL/apache/$TPL.stpl"
|
tpl_file="$WEBTPL/$WEB_SYSTEM/$TPL.stpl"
|
||||||
conf="$HOMEDIR/$user/conf/web/shttpd.conf"
|
conf="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.conf"
|
||||||
del_web_config
|
del_web_config
|
||||||
add_web_config
|
add_web_config
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Checking nginx
|
# Checking proxy
|
||||||
if [ ! -z "$NGINX" ]; then
|
if [ ! -z "$PROXY" ]; then
|
||||||
tpl_file="$WEBTPL/nginx/$NGINX.tpl"
|
tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.tpl"
|
||||||
conf="$HOMEDIR/$user/conf/web/nginx.conf"
|
conf="$HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf"
|
||||||
del_web_config
|
del_web_config
|
||||||
add_web_config
|
add_web_config
|
||||||
|
|
||||||
if [ "$SSL" = 'yes' ]; then
|
if [ "$SSL" = 'yes' ]; then
|
||||||
tpl_file="$WEBTPL/nginx/$NGINX.stpl"
|
tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.stpl"
|
||||||
conf="$HOMEDIR/$user/conf/web/snginx.conf"
|
conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf"
|
||||||
del_web_config
|
del_web_config
|
||||||
add_web_config
|
add_web_config
|
||||||
fi
|
fi
|
||||||
|
@ -102,7 +102,8 @@ increase_user_value "$user" '$U_WEB_ALIASES'
|
||||||
|
|
||||||
# Adding task to the vesta pipe
|
# Adding task to the vesta pipe
|
||||||
if [ "$restart" != 'no' ]; then
|
if [ "$restart" != 'no' ]; then
|
||||||
$BIN/v-restart-web "$EVENT"
|
$BIN/v-restart-web
|
||||||
|
$BIN/v-restart-proxy
|
||||||
fi
|
fi
|
||||||
|
|
||||||
log_history "added $dom_alias as alias for $domain"
|
log_history "added $dom_alias as alias for $domain"
|
||||||
|
|
|
@ -55,9 +55,19 @@ if [ ! -z "$FTP_USER" ]; then
|
||||||
/usr/sbin/userdel -f $FTP_USER
|
/usr/sbin/userdel -f $FTP_USER
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Define shell
|
||||||
|
shell='/sbin/nologin'
|
||||||
|
if [ -e "/usr/bin/rssh" ]; then
|
||||||
|
shell='/usr/bin/rssh'
|
||||||
|
fi
|
||||||
|
|
||||||
# Adding user
|
# Adding user
|
||||||
/usr/sbin/adduser -o -u $(id -u $user) -g $user -s /sbin/nologin -M \
|
/usr/sbin/adduser -o -u $(id -u $user) \
|
||||||
-d "$HOMEDIR/$user/web/$domain" $ftp_user > /dev/null 2>&1
|
-g $user \
|
||||||
|
-s $shell \
|
||||||
|
-M -d "$HOMEDIR/$user/web/$domain" \
|
||||||
|
$ftp_user > /dev/null 2>&1
|
||||||
|
|
||||||
echo "$ftp_password" | /usr/bin/passwd "$ftp_user" --stdin &>/dev/null
|
echo "$ftp_password" | /usr/bin/passwd "$ftp_user" --stdin &>/dev/null
|
||||||
ftp_md5="$(awk -v user=$ftp_user -F : 'user == $1 {print $2}' /etc/shadow)"
|
ftp_md5="$(awk -v user=$ftp_user -F : 'user == $1 {print $2}' /etc/shadow)"
|
||||||
|
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# info: add webdomain nginx support
|
# info: add webdomain proxy support
|
||||||
# options: USER DOMAIN [TEMPLATE] [EXTENTIONS] [RESTART]
|
# options: USER DOMAIN [TEMPLATE] [EXTENTIONS] [RESTART]
|
||||||
#
|
#
|
||||||
# The function enables nginx support for a domain. It can significantly improve
|
# The function enables proxy support for a domain. This can significantly
|
||||||
# website speed.
|
# improve website speed.
|
||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
@ -38,14 +38,11 @@ is_object_valid 'user' 'USER' "$user"
|
||||||
is_object_unsuspended 'user' 'USER' "$user"
|
is_object_unsuspended 'user' 'USER' "$user"
|
||||||
is_object_valid 'web' 'DOMAIN' "$domain"
|
is_object_valid 'web' 'DOMAIN' "$domain"
|
||||||
is_object_unsuspended 'web' 'DOMAIN' "$domain"
|
is_object_unsuspended 'web' 'DOMAIN' "$domain"
|
||||||
is_object_value_empty 'web' 'DOMAIN' "$domain" '$NGINX'
|
is_object_value_empty 'web' 'DOMAIN' "$domain" '$PROXY'
|
||||||
if [ ! -z "$template" ]; then
|
if [ -z $template ]; then
|
||||||
validate_format 'template'
|
template=$(get_user_value '$PROXY_TEMPLATE')
|
||||||
is_nginx_template_valid
|
|
||||||
else
|
|
||||||
template=$(get_user_value '$TEMPLATE')
|
|
||||||
is_nginx_template_valid
|
|
||||||
fi
|
fi
|
||||||
|
is_proxy_template_valid
|
||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
@ -54,10 +51,10 @@ fi
|
||||||
|
|
||||||
# Defining domain parameters
|
# Defining domain parameters
|
||||||
get_domain_values 'web'
|
get_domain_values 'web'
|
||||||
NGINX="$template"
|
PROXY="$template"
|
||||||
NGINX_EXT="$extentions"
|
PROXY_EXT="$extentions"
|
||||||
tpl_file="$WEBTPL/nginx/$NGINX.tpl"
|
tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.tpl"
|
||||||
conf="$HOMEDIR/$user/conf/web/nginx.conf"
|
conf="$HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf"
|
||||||
ip=$(get_real_ip $IP)
|
ip=$(get_real_ip $IP)
|
||||||
|
|
||||||
# Preparing domain values for the template substitution
|
# Preparing domain values for the template substitution
|
||||||
|
@ -65,49 +62,45 @@ upd_web_domain_values
|
||||||
add_web_config
|
add_web_config
|
||||||
|
|
||||||
# Set permission and ownership
|
# Set permission and ownership
|
||||||
chown root:nginx $conf
|
chown root:$user $conf
|
||||||
chmod 640 $conf
|
chmod 640 $conf
|
||||||
|
|
||||||
# Checking main vesta httpd config
|
# Checking proxy config
|
||||||
main_conf='/etc/nginx/conf.d/vesta_users.conf'
|
proxy_conf="/etc/$PROXY_SYSTEM/conf.d/vesta.conf"
|
||||||
main_conf_check=$(grep "$conf" $main_conf )
|
if [ -z "$(grep "$conf" $proxy_conf)" ]; then
|
||||||
if [ -z "$main_conf_check" ]; then
|
echo "include $conf;" >> $proxy_conf
|
||||||
echo "include $conf;" >>$main_conf
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Checking ssl
|
# Checking ssl
|
||||||
if [ "$SSL" = 'yes' ]; then
|
if [ "$SSL" = 'yes' ]; then
|
||||||
tpl_file="$WEBTPL/nginx/$NGINX.stpl"
|
tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.stpl"
|
||||||
conf="$HOMEDIR/$user/conf/web/snginx.conf"
|
conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf"
|
||||||
add_web_config
|
add_web_config
|
||||||
|
|
||||||
chown root:nginx $conf
|
chown root:$user $conf
|
||||||
chmod 640 $conf
|
chmod 640 $conf
|
||||||
|
|
||||||
main_conf='/etc/nginx/conf.d/vesta_users.conf'
|
proxy_conf="/etc/$PROXY_SYSTEM/conf.d/vesta.conf"
|
||||||
main_conf_check=$(grep "$conf" $main_conf )
|
if [ -z "$(grep "$conf" $proxy_conf)" ]; then
|
||||||
if [ -z "$main_conf_check" ]; then
|
echo "include $conf;" >> $proxy_conf
|
||||||
echo "include $conf;" >>$main_conf
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
# Vesta #
|
# Vesta #
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
|
||||||
# Update config
|
# Update config
|
||||||
update_object_value 'web' 'DOMAIN' "$domain" '$NGINX' "$NGINX"
|
update_object_value 'web' 'DOMAIN' "$domain" '$PROXY' "$PROXY"
|
||||||
update_object_value 'web' 'DOMAIN' "$domain" '$NGINX_EXT' "$extentions"
|
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-web "$EVENT"
|
$BIN/v-restart-proxy "$EVENT"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
log_history "enabled nginx support for $domain"
|
log_history "enabled proxy support for $domain"
|
||||||
log_event "$OK" "$EVENT"
|
log_event "$OK" "$EVENT"
|
||||||
|
|
||||||
exit
|
exit
|
||||||
|
|
|
@ -41,7 +41,6 @@ is_object_unsuspended 'user' 'USER' "$user"
|
||||||
is_object_valid 'web' 'DOMAIN' "$domain"
|
is_object_valid 'web' 'DOMAIN' "$domain"
|
||||||
is_object_unsuspended 'web' 'DOMAIN' "$domain"
|
is_object_unsuspended 'web' 'DOMAIN' "$domain"
|
||||||
is_object_value_empty 'web' 'DOMAIN' "$domain" '$SSL'
|
is_object_value_empty 'web' 'DOMAIN' "$domain" '$SSL'
|
||||||
#is_ip_owner
|
|
||||||
is_web_domain_cert_valid
|
is_web_domain_cert_valid
|
||||||
|
|
||||||
|
|
||||||
|
@ -62,18 +61,18 @@ chmod 660 $USER_DATA/ssl/$domain.*
|
||||||
|
|
||||||
# Parsing domain values
|
# Parsing domain values
|
||||||
get_domain_values 'web'
|
get_domain_values 'web'
|
||||||
conf="$HOMEDIR/$user/conf/web/shttpd.conf"
|
conf="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.conf"
|
||||||
tpl_file="$WEBTPL/apache/$TPL.stpl"
|
tpl_file="$WEBTPL/$WEB_SYSTEM/$TPL.stpl"
|
||||||
SSL_HOME="$ssl_home"
|
SSL_HOME="$ssl_home"
|
||||||
ip=$(get_real_ip $IP)
|
ip=$(get_real_ip $IP)
|
||||||
|
|
||||||
# Preparing domain values for the template substitution
|
# Preparing domain values for the template substitution
|
||||||
upd_web_domain_values
|
upd_web_domain_values
|
||||||
|
|
||||||
# Adding domain to the shttpd.conf
|
# Adding domain to the web config
|
||||||
add_web_config
|
add_web_config
|
||||||
|
|
||||||
chown root:apache $conf
|
chown root:$user $conf
|
||||||
chmod 640 $conf
|
chmod 640 $conf
|
||||||
|
|
||||||
# Adding certificate to user dir
|
# Adding certificate to user dir
|
||||||
|
@ -85,32 +84,29 @@ if [ -e "$USER_DATA/ssl/$domain.ca" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Running template trigger
|
# Running template trigger
|
||||||
if [ -x $WEBTPL/apache/$template.sh ]; then
|
if [ -x $WEBTPL/$WEB_SYSTEM/$template.sh ]; then
|
||||||
$WEBTPL/apache/$template.sh $user $domain $ip $HOMEDIR $sdocroot
|
$WEBTPL/$WEB_SYSTEM/$template.sh $user $domain $ip $HOMEDIR $sdocroot
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Checking main vesta httpd config
|
# Checking web config
|
||||||
main_conf='/etc/httpd/conf.d/vesta.conf'
|
web_conf="/etc/$WEB_SYSTEM/conf.d/vesta.conf"
|
||||||
main_conf_check=$(grep "$conf" $main_conf )
|
if [ -z "$(grep "$conf" $web_conf)" ]; then
|
||||||
if [ -z "$main_conf_check" ]; then
|
echo "Include $conf" >> $web_conf
|
||||||
echo "Include $conf" >> $main_conf
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Checking nginx
|
# Checking proxy
|
||||||
if [ ! -z "$NGINX" ]; then
|
if [ ! -z "$PROXY" ]; then
|
||||||
# Adding domain to the snginx.conf
|
conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf"
|
||||||
conf="$HOMEDIR/$user/conf/web/snginx.conf"
|
tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.stpl"
|
||||||
tpl_file="$WEBTPL/nginx/$NGINX.stpl"
|
|
||||||
add_web_config
|
add_web_config
|
||||||
|
|
||||||
chown root:nginx $conf
|
chown root:$user $conf
|
||||||
chmod 640 $conf
|
chmod 640 $conf
|
||||||
|
|
||||||
# Checking vesta nginx config
|
# Checking proxy config
|
||||||
main_conf='/etc/nginx/conf.d/vesta_users.conf'
|
proxy_conf="/etc/$PROXY_SYSTEM/conf.d/vesta.conf"
|
||||||
main_conf_check=$(grep "$conf" $main_conf )
|
if [ -z "$(grep "$conf" $proxy_conf )" ]; then
|
||||||
if [ -z "$main_conf_check" ]; then
|
echo "include $conf;" >> $proxy_conf
|
||||||
echo "include $conf;" >>$main_conf
|
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -166,36 +166,33 @@ then
|
||||||
conf="$USER_DATA/web.conf"
|
conf="$USER_DATA/web.conf"
|
||||||
grep "DOMAIN='$domain'" $conf > vesta/web.conf
|
grep "DOMAIN='$domain'" $conf > vesta/web.conf
|
||||||
|
|
||||||
# Apache config
|
# WEB config
|
||||||
if [ "$WEB_SYSTEM" = 'apache' ]; then
|
tpl_file="$WEBTPL/$WEB_SYSTEM/$TPL.tpl"
|
||||||
# Parsing httpd.conf
|
conf="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.conf"
|
||||||
tpl_file="$WEBTPL/apache/$TPL.tpl"
|
get_web_config_brds
|
||||||
conf="$HOMEDIR/$user/conf/web/httpd.conf"
|
sed -n "$top_line,$bottom_line p" $conf > conf/$WEB_SYSTEM.conf
|
||||||
get_web_config_brds
|
|
||||||
sed -n "$top_line,$bottom_line p" $conf > conf/httpd.conf
|
|
||||||
|
|
||||||
# SSL check
|
# SSL check
|
||||||
if [ "$SSL" = 'yes' ]; then
|
if [ "$SSL" = 'yes' ]; then
|
||||||
tpl_file="$WEBTPL/apache/$TPL.stpl"
|
tpl_file="$WEBTPL/$WEB_SYSTEM/$TPL.stpl"
|
||||||
conf="$HOMEDIR/$user/conf/web/shttpd.conf"
|
conf="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.conf"
|
||||||
get_web_config_brds
|
get_web_config_brds
|
||||||
sed -n "$top_line,$bottom_line p" $conf > conf/shttpd.conf
|
sed -n "$top_line,$bottom_line p" $conf > conf/s$WEB_SYSTEM.conf
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Nginx config
|
# Proxy config
|
||||||
if [ ! -z "$NGINX" ] ; then
|
if [ ! -z "$PROXY" ]; then
|
||||||
tpl_file="$WEBTPL/nginx/$NGINX.tpl"
|
tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.tpl"
|
||||||
conf="$HOMEDIR/$user/conf/web/nginx.conf"
|
conf="$HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf"
|
||||||
get_web_config_brds
|
get_web_config_brds
|
||||||
sed -n "$top_line,$bottom_line p" $conf > conf/nginx.conf
|
sed -n "$top_line,$bottom_line p" $conf > conf/$PROXY_SYSTEM.conf
|
||||||
|
|
||||||
# SSL check
|
# SSL proxy config
|
||||||
if [ "$SSL" = 'yes' ] ; then
|
if [ ! -z "$PROXY" ] && [ "$SSL" = 'yes' ] ; then
|
||||||
tpl_file="$WEBTPL/nginx/$NGINX.stpl"
|
tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.stpl"
|
||||||
conf="$HOMEDIR/$user/conf/web/snginx.conf"
|
conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf"
|
||||||
get_web_config_brds
|
get_web_config_brds
|
||||||
sed -n "$top_line,$bottom_line p" $conf > conf/snginx.conf
|
sed -n "$top_line,$bottom_line p" $conf > conf/s$PROXY_SYSTEM.conf
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,9 @@ change_user_package() {
|
||||||
echo "FNAME='$FNAME'
|
echo "FNAME='$FNAME'
|
||||||
LNAME='$LNAME'
|
LNAME='$LNAME'
|
||||||
PACKAGE='$package'
|
PACKAGE='$package'
|
||||||
TEMPLATE='$TEMPLATE'
|
WEB_TEMPLATE='$WEB_TEMPLATE'
|
||||||
|
PROXY_TEMPLATE='$PROXY_TEMPLATE'
|
||||||
|
DNS_TEMPLATE='$DNS_TEMPLATE'
|
||||||
WEB_DOMAINS='$WEB_DOMAINS'
|
WEB_DOMAINS='$WEB_DOMAINS'
|
||||||
WEB_ALIASES='$WEB_ALIASES'
|
WEB_ALIASES='$WEB_ALIASES'
|
||||||
DNS_DOMAINS='$DNS_DOMAINS'
|
DNS_DOMAINS='$DNS_DOMAINS'
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# info: change user default template
|
# info: change user default template
|
||||||
# options: USER TEMPLATE
|
# options: USER TYPE TEMPLATE
|
||||||
#
|
#
|
||||||
# The function changes default user web template.
|
# The function changes default user web template.
|
||||||
|
|
||||||
|
@ -11,7 +11,8 @@
|
||||||
|
|
||||||
# Argument defenition
|
# Argument defenition
|
||||||
user=$1
|
user=$1
|
||||||
template=$2
|
type=$(echo "$2" | tr '[:lower:]' '[:upper:]')
|
||||||
|
template=$3
|
||||||
|
|
||||||
# Includes
|
# Includes
|
||||||
source $VESTA/conf/vesta.conf
|
source $VESTA/conf/vesta.conf
|
||||||
|
@ -23,27 +24,33 @@ source $VESTA/func/domain.sh
|
||||||
# Verifications #
|
# Verifications #
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
|
||||||
check_args '2' "$#" 'USER TEMPLATE'
|
check_args '3' "$#" 'USER TYPE TEMPLATE'
|
||||||
validate_format 'user' 'template'
|
validate_format 'user' 'template'
|
||||||
is_object_valid 'user' 'USER' "$user"
|
is_object_valid 'user' 'USER' "$user"
|
||||||
is_object_unsuspended 'user' 'USER' "$user"
|
is_object_unsuspended 'user' 'USER' "$user"
|
||||||
is_apache_template_valid
|
|
||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
# Action #
|
# Action #
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
|
||||||
|
case $type in
|
||||||
|
WEB) is_web_template_valid;
|
||||||
|
update_user_value "$user" '$WEB_TEMPLATE' "$template";;
|
||||||
|
PROXY) is_proxy_template_valid;
|
||||||
|
update_user_value "$user" '$PROXY_TEMPLATE' "$template";;
|
||||||
|
DNS) is_dns_template_valid;
|
||||||
|
update_user_value "$user" '$DNS_TEMPLATE' "$template";;
|
||||||
|
*) check_args '1' '0' 'USER TYPE TEMPLATE'
|
||||||
|
esac
|
||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
# Vesta #
|
# Vesta #
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
|
||||||
# Changing user shell
|
|
||||||
update_user_value "$user" '$TEMPLATE' "$template"
|
|
||||||
|
|
||||||
# Logging
|
# Logging
|
||||||
log_history "changed $user template to $template" '' 'admin'
|
log_history "changed $type template to $template"
|
||||||
log_event "$OK" "$EVENT"
|
log_event "$OK" "$EVENT"
|
||||||
|
|
||||||
exit
|
exit
|
||||||
|
|
|
@ -2,8 +2,7 @@
|
||||||
# info: change web domain ip address
|
# info: change web domain ip address
|
||||||
# options: USER DOMAIN IP [RESTART]
|
# options: USER DOMAIN IP [RESTART]
|
||||||
#
|
#
|
||||||
# The call is used for changing the site ip address. The ip change will be
|
# The call is used for changing the site ip address.
|
||||||
# performed for a virtual apache host and for a configuration nginx file both.
|
|
||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
@ -46,30 +45,30 @@ is_ip_avalable
|
||||||
# Define variable for replace
|
# Define variable for replace
|
||||||
get_domain_values 'web'
|
get_domain_values 'web'
|
||||||
ip=$(get_real_ip $ip)
|
ip=$(get_real_ip $ip)
|
||||||
tpl_file="$WEBTPL/apache/$TPL.tpl"
|
tpl_file="$WEBTPL/$WEB_SYSTEM/$TPL.tpl"
|
||||||
conf="$HOMEDIR/$user/conf/web/httpd.conf"
|
conf="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.conf"
|
||||||
old=$(get_real_ip $IP)
|
old=$(get_real_ip $IP)
|
||||||
new=$ip
|
new=$ip
|
||||||
replace_web_config
|
replace_web_config
|
||||||
|
|
||||||
# Checking ssl
|
# Checking SSL
|
||||||
if [ "$SSL" = 'yes' ]; then
|
if [ "$SSL" = 'yes' ]; then
|
||||||
tpl_file="$WEBTPL/apache/$TPL.stpl"
|
tpl_file="$WEBTPL/$WEB_SYSTEM/$TPL.stpl"
|
||||||
conf="$HOMEDIR/$user/conf/web/shttpd.conf"
|
conf="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.conf"
|
||||||
replace_web_config
|
replace_web_config
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Checking nginx
|
# Checking proxy
|
||||||
if [ ! -z "$NGINX" ]; then
|
if [ ! -z "$PROXY" ]; then
|
||||||
tpl_file="$WEBTPL/nginx/$NGINX.tpl"
|
tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.tpl"
|
||||||
conf="$HOMEDIR/$user/conf/web/nginx.conf"
|
conf="$HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf"
|
||||||
replace_web_config
|
replace_web_config
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Checking nginx
|
# Checking SSL proxy
|
||||||
if [ "$SSL" = 'yes' ] && [ ! -z "$NGINX" ]; then
|
if [ "$SSL" = 'yes' ] && [ ! -z "$PROXY" ]; then
|
||||||
tpl_file="$WEBTPL/nginx/$NGINX.stpl"
|
tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.stpl"
|
||||||
conf="$HOMEDIR/$user/conf/web/snginx.conf"
|
conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf"
|
||||||
replace_web_config
|
replace_web_config
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -87,7 +86,8 @@ update_object_value 'web' 'DOMAIN' "$domain" '$IP' "$3"
|
||||||
|
|
||||||
# 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-proxy
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Logging
|
# Logging
|
||||||
|
|
|
@ -1,9 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# info: change web domain nginx template
|
# info: change web domain proxy template
|
||||||
# options: USER DOMAIN TEMPLATE [EXTENTIONS] [RESTART]
|
# options: USER DOMAIN TEMPLATE [EXTENTIONS] [RESTART]
|
||||||
#
|
#
|
||||||
# The function changes template of nginx.conf configuration file. The content
|
# The function changes proxy template
|
||||||
# of webdomain directories remains untouched.
|
|
||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
@ -39,8 +38,8 @@ is_object_valid 'user' 'USER' "$user"
|
||||||
is_object_unsuspended 'user' 'USER' "$user"
|
is_object_unsuspended 'user' 'USER' "$user"
|
||||||
is_object_valid 'web' 'DOMAIN' "$domain"
|
is_object_valid 'web' 'DOMAIN' "$domain"
|
||||||
is_object_unsuspended 'web' 'DOMAIN' "$domain"
|
is_object_unsuspended 'web' 'DOMAIN' "$domain"
|
||||||
is_object_value_exist 'web' 'DOMAIN' "$domain" '$NGINX'
|
is_object_value_exist 'web' 'DOMAIN' "$domain" '$PROXY'
|
||||||
is_nginx_template_valid
|
is_proxy_template_valid
|
||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
@ -49,36 +48,29 @@ is_nginx_template_valid
|
||||||
|
|
||||||
# Parsing domain values
|
# Parsing domain values
|
||||||
get_domain_values 'web'
|
get_domain_values 'web'
|
||||||
tpl_file="$WEBTPL/nginx/$NGINX.tpl"
|
tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.tpl"
|
||||||
conf="$HOMEDIR/$user/conf/web/nginx.conf"
|
conf="$HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf"
|
||||||
ip=$(get_real_ip $IP)
|
ip=$(get_real_ip $IP)
|
||||||
|
|
||||||
# Delete old vhost
|
# Delete old vhost
|
||||||
del_web_config
|
del_web_config
|
||||||
|
|
||||||
# Checking ssl
|
|
||||||
if [ "$SSL" = 'yes' ]; then
|
|
||||||
tpl_file="$WEBTPL/nginx/$NGINX.stpl"
|
|
||||||
conf="$HOMEDIR/$user/conf/web/snginx.conf"
|
|
||||||
del_web_config
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Add new vhost
|
# Add new vhost
|
||||||
NGINX="$template"
|
PROXY="$template"
|
||||||
NGINX_EXT="$extentions"
|
PROXY_EXT="$extentions"
|
||||||
tpl_file="$WEBTPL/nginx/$NGINX.tpl"
|
|
||||||
conf="$HOMEDIR/$user/conf/web/nginx.conf"
|
|
||||||
upd_web_domain_values
|
upd_web_domain_values
|
||||||
add_web_config
|
add_web_config
|
||||||
chown root:nginx $conf
|
chown root:$user $conf
|
||||||
chmod 640 $conf
|
chmod 640 $conf
|
||||||
|
|
||||||
# Checking ssl
|
# Checking SSL
|
||||||
if [ "$SSL" = 'yes' ]; then
|
if [ "$SSL" = 'yes' ]; then
|
||||||
tpl_file="$WEBTPL/nginx/$NGINX.stpl"
|
tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.stpl"
|
||||||
conf="$HOMEDIR/$user/conf/web/snginx.conf"
|
conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf"
|
||||||
|
del_web_config
|
||||||
|
|
||||||
add_web_config
|
add_web_config
|
||||||
chown root:nginx $conf
|
chown root:$user $conf
|
||||||
chmod 640 $conf
|
chmod 640 $conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -88,16 +80,16 @@ fi
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
|
||||||
# Update config
|
# Update config
|
||||||
update_object_value 'web' 'DOMAIN' "$domain" '$NGINX' "$NGINX"
|
update_object_value 'web' 'DOMAIN' "$domain" '$PROXY' "$PROXY"
|
||||||
update_object_value 'web' 'DOMAIN' "$domain" '$NGINX_EXT' "$extentions"
|
update_object_value 'web' 'DOMAIN' "$domain" '$PROXY_EXT' "$extentions"
|
||||||
|
|
||||||
# Restart web
|
# Restart web
|
||||||
if [ "$restart" != 'no' ]; then
|
if [ "$restart" != 'no' ]; then
|
||||||
$BIN/v-restart-web "$EVENT"
|
$BIN/v-restart-proxy
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Logging
|
# Logging
|
||||||
log_history "changed nginx template for $domain to $template"
|
log_history "changed proxy template for $domain to $template"
|
||||||
log_event "$OK" "$EVENT"
|
log_event "$OK" "$EVENT"
|
||||||
|
|
||||||
exit
|
exit
|
|
@ -70,7 +70,8 @@ fi
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
|
||||||
# Restart web server
|
# Restart web server
|
||||||
$BIN/v-restart-web "$EVENT"
|
$BIN/v-restart-web
|
||||||
|
$BIN/v-restart-proxy
|
||||||
|
|
||||||
# Logging
|
# Logging
|
||||||
log_history "changed ssl certificate for $domain"
|
log_history "changed ssl certificate for $domain"
|
||||||
|
|
|
@ -39,8 +39,8 @@ is_object_value_exist 'web' 'DOMAIN' "$domain" '$SSL'
|
||||||
get_domain_values 'web'
|
get_domain_values 'web'
|
||||||
old_ssl_home=$SSL_HOME
|
old_ssl_home=$SSL_HOME
|
||||||
SSL_HOME=$ssl_home
|
SSL_HOME=$ssl_home
|
||||||
tpl_file="$WEBTPL/apache/$TPL.stpl"
|
tpl_file="$WEBTPL/$WEB_SYSTEM/$TPL.stpl"
|
||||||
conf="$HOMEDIR/$user/conf/web/shttpd.conf"
|
conf="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.conf"
|
||||||
|
|
||||||
# Parsing tpl_option
|
# Parsing tpl_option
|
||||||
case $SSL_HOME in
|
case $SSL_HOME in
|
||||||
|
@ -54,10 +54,10 @@ esac
|
||||||
# Changing sslhome directory
|
# Changing sslhome directory
|
||||||
replace_web_config
|
replace_web_config
|
||||||
|
|
||||||
# Checking nginx config
|
# Checking proxy config
|
||||||
if [ ! -z "$NGINX" ]; then
|
if [ ! -z "$PROXY" ]; then
|
||||||
tpl_file="$WEBTPL/nginx/$NGINX.stpl"
|
tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.stpl"
|
||||||
conf="$HOMEDIR/$user/conf/web/snginx.conf"
|
conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf"
|
||||||
replace_web_config
|
replace_web_config
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -70,7 +70,8 @@ fi
|
||||||
update_object_value 'web' 'DOMAIN' "$domain" '$SSL_HOME' "$SSL_HOME"
|
update_object_value 'web' 'DOMAIN' "$domain" '$SSL_HOME' "$SSL_HOME"
|
||||||
|
|
||||||
# Restart web server
|
# Restart web server
|
||||||
$BIN/v-restart-web "$EVENT"
|
$BIN/v-restart-web
|
||||||
|
$BIN/v-restart-proxy
|
||||||
|
|
||||||
# Logging
|
# Logging
|
||||||
log_history "changed ssl home for $domain to $ssl_home"
|
log_history "changed ssl home for $domain to $ssl_home"
|
||||||
|
|
|
@ -2,7 +2,7 @@
|
||||||
# info: change web domain template
|
# info: change web domain template
|
||||||
# options: USER DOMAIN TEMPLATE [RESTART]
|
# options: USER DOMAIN TEMPLATE [RESTART]
|
||||||
#
|
#
|
||||||
# The function changes template of httpd.conf configuration file. The content
|
# The function changes template of the web configuration file. The content
|
||||||
# of webdomain directories remains untouched.
|
# of webdomain directories remains untouched.
|
||||||
|
|
||||||
|
|
||||||
|
@ -35,7 +35,7 @@ is_object_valid 'user' 'USER' "$user"
|
||||||
is_object_unsuspended 'user' 'USER' "$user"
|
is_object_unsuspended 'user' 'USER' "$user"
|
||||||
is_object_valid 'web' 'DOMAIN' "$domain"
|
is_object_valid 'web' 'DOMAIN' "$domain"
|
||||||
is_object_unsuspended 'web' 'DOMAIN' "$domain"
|
is_object_unsuspended 'web' 'DOMAIN' "$domain"
|
||||||
is_apache_template_valid
|
is_web_template_valid
|
||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
@ -47,40 +47,40 @@ get_domain_values 'web'
|
||||||
ip=$(get_real_ip $IP)
|
ip=$(get_real_ip $IP)
|
||||||
|
|
||||||
# Deleting domain
|
# Deleting domain
|
||||||
tpl_file="$WEBTPL/apache/$TPL.tpl"
|
tpl_file="$WEBTPL/$WEB_SYSTEM/$TPL.tpl"
|
||||||
old_tpl=$TPL
|
old_tpl=$TPL
|
||||||
conf="$HOMEDIR/$user/conf/web/httpd.conf"
|
conf="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.conf"
|
||||||
del_web_config
|
del_web_config
|
||||||
|
|
||||||
# Deleting ssl vhost
|
# Deleting ssl vhost
|
||||||
if [ "$SSL" = 'yes' ]; then
|
if [ "$SSL" = 'yes' ]; then
|
||||||
tpl_file="$WEBTPL/apache/$TPL.stpl"
|
tpl_file="$WEBTPL/$WEB_SYSTEM/$TPL.stpl"
|
||||||
conf="$HOMEDIR/$user/conf/web/shttpd.conf"
|
conf="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.conf"
|
||||||
del_web_config
|
del_web_config
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Defining variables for new vhost config
|
# Defining variables for new vhost config
|
||||||
upd_web_domain_values
|
upd_web_domain_values
|
||||||
tpl_file="$WEBTPL/apache/$template.tpl"
|
tpl_file="$WEBTPL/$WEB_SYSTEM/$template.tpl"
|
||||||
|
|
||||||
# Adding domain to the httpd.conf
|
# Adding domain to the web conf
|
||||||
add_web_config
|
add_web_config
|
||||||
|
|
||||||
# Running template trigger
|
# Running template trigger
|
||||||
if [ -x $WEBTPL/apache/$template.sh ]; then
|
if [ -x $WEBTPL/$WEB_SYSTEM/$template.sh ]; then
|
||||||
$WEBTPL/apache/$template.sh $user $domain $ip $HOMEDIR $docroot
|
$WEBTPL/$WEB_SYSTEM/$template.sh $user $domain $ip $HOMEDIR $docroot
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Checking ssl
|
# Checking SSL
|
||||||
if [ "$SSL" = 'yes' ]; then
|
if [ "$SSL" = 'yes' ]; then
|
||||||
conf="$HOMEDIR/$user/conf/web/shttpd.conf"
|
conf="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.conf"
|
||||||
tpl_file="$WEBTPL/apache/$template.stpl"
|
tpl_file="$WEBTPL/$WEB_SYSTEM/$template.stpl"
|
||||||
|
|
||||||
add_web_config
|
add_web_config
|
||||||
|
|
||||||
# Running template trigger
|
# Running template trigger
|
||||||
if [ -x $WEBTPL/apache/$template.sh ]; then
|
if [ -x $WEBTPL/$WEB_SYSTEM/$template.sh ]; then
|
||||||
$WEBTPL/apache/$template.sh \
|
$WEBTPL/$WEB_SYSTEM/$template.sh \
|
||||||
"$user" "$domain" "$ip" "$HOMEDIR" "$sdocroot"
|
"$user" "$domain" "$ip" "$HOMEDIR" "$sdocroot"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -95,7 +95,7 @@ update_object_value 'web' 'DOMAIN' "$domain" '$TPL' "$template"
|
||||||
|
|
||||||
# Restart web
|
# Restart web
|
||||||
if [ "$restart" != 'no' ]; then
|
if [ "$restart" != 'no' ]; then
|
||||||
$BIN/v-restart-web "$EVENT"
|
$BIN/v-restart-web
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Logging
|
# Logging
|
||||||
|
|
|
@ -35,34 +35,43 @@ is_ip_key_empty '$U_SYS_USERS'
|
||||||
# Action #
|
# Action #
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
|
||||||
# Defining config paths
|
|
||||||
conf='/etc/httpd/conf.d/vesta.conf'
|
|
||||||
nconf='/etc/nginx/conf.d/vesta_ip.conf'
|
|
||||||
iconf='/etc/sysconfig/network-scripts/ifcfg'
|
|
||||||
rconf='/etc/httpd/conf.d/mod_extract_forwarded.conf'
|
|
||||||
|
|
||||||
# Get ip owner
|
# Get ip owner
|
||||||
user="$(get_ip_value '$OWNER')"
|
user="$(get_ip_value '$OWNER')"
|
||||||
ip_status="$(get_ip_value '$STATUS')"
|
ip_status="$(get_ip_value '$STATUS')"
|
||||||
|
|
||||||
# Deleting interface
|
# Deleting interface
|
||||||
interface=$(/sbin/ifconfig |grep -B1 "addr:$ip "|head -n 1 |cut -f 1 -d ' ')
|
interface=$(/sbin/ifconfig | grep -B1 "dr:$ip " | head -n1 | cut -f1 -d \ )
|
||||||
if [ ! -z "$interface" ] && [ -z "$(echo $interface|cut -s -f2 -d :)" ]; then
|
if [ ! -z "$interface" ] && [ -z "$(echo $interface |cut -s -f2 -d :)" ]; then
|
||||||
echo "Error: Main IP on interface"
|
echo "Error: can't delete main IP address"
|
||||||
log_event "$E_FORBIDEN" "$EVENT"
|
log_event "$E_FORBIDEN" "$EVENT"
|
||||||
exit $E_FORBIDEN
|
exit $E_FORBIDEN
|
||||||
fi
|
fi
|
||||||
if [ ! -z "$interface" ]; then
|
if [ ! -z "$interface" ]; then
|
||||||
/sbin/ifconfig "$interface" down
|
/sbin/ifconfig $interface down
|
||||||
iconf='/etc/sysconfig/network-scripts/ifcfg'
|
rm -f /etc/sysconfig/network-scripts/ifcfg-$interface
|
||||||
rm -f $iconf-$interface
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Deleting vesta ip
|
# Deleting vesta ip
|
||||||
rm -f $VESTA/data/ips/$ip
|
rm -f $VESTA/data/ips/$ip
|
||||||
|
|
||||||
# Deleting namehosting support
|
# Disable virtual ip hosting support
|
||||||
namehost_ip_disable
|
web_conf="/etc/$WEB_SYSTEM/conf.d/vesta.conf"
|
||||||
|
if [ ! -z "$WEB_SYSTEM" ]; then
|
||||||
|
sed -i "/NameVirtualHost $ip:/d" $web_conf
|
||||||
|
sed -i "/Listen $ip:/d" $web_conf
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Deleting proxy config
|
||||||
|
if [ ! -z "$PROXY_SYSTEM" ]; then
|
||||||
|
rm -f /etc/$PROXY_SYSTEM/conf.d/$ip.conf
|
||||||
|
|
||||||
|
fw_conf="/etc/$WEB_SYSTEM/conf.d/mod_extract_forwarded.conf"
|
||||||
|
if [ -e "$fw_conf" ]; then
|
||||||
|
ips=$(grep 'MEFaccept 127.0.0.1' $fw_conf)
|
||||||
|
new_ips=$(echo "$ips" | sed -e "s/$ip//" )
|
||||||
|
sed -i "s/$ips/$new_ips/g" $fw_conf
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
@ -89,12 +98,11 @@ fi
|
||||||
|
|
||||||
|
|
||||||
# Adding task to the vesta pipe
|
# Adding task to the vesta pipe
|
||||||
if [ "$web_restart" = 'yes' ]; then
|
$BIN/v-restart-web
|
||||||
$BIN/v-restart-web "$EVENT"
|
$BIN/v-restart-proxy
|
||||||
fi
|
|
||||||
|
|
||||||
# Logging
|
# Logging
|
||||||
log_history "delted system ip address $ip" '' 'admin'
|
log_history "deleted system ip address $ip"
|
||||||
log_event "$OK" "$EVENT"
|
log_event "$OK" "$EVENT"
|
||||||
|
|
||||||
exit
|
exit
|
||||||
|
|
|
@ -44,8 +44,8 @@ is_object_unsuspended 'web' 'DOMAIN' "$domain"
|
||||||
|
|
||||||
# Get template name
|
# Get template name
|
||||||
get_domain_values 'web'
|
get_domain_values 'web'
|
||||||
tpl_file="$WEBTPL/apache/$TPL.tpl"
|
tpl_file="$WEBTPL/$WEB_SYSTEM/$TPL.tpl"
|
||||||
conf="$HOMEDIR/$user/conf/web/httpd.conf"
|
conf="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.conf"
|
||||||
ip=$(get_real_ip $IP)
|
ip=$(get_real_ip $IP)
|
||||||
|
|
||||||
# Deleting domain
|
# Deleting domain
|
||||||
|
@ -58,26 +58,26 @@ else
|
||||||
aliases=0
|
aliases=0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Checking ssl
|
# Checking SSL
|
||||||
if [ "$SSL" = 'yes' ]; then
|
if [ "$SSL" = 'yes' ]; then
|
||||||
tpl_file="$WEBTPL/apache/$TPL.stpl"
|
tpl_file="$WEBTPL/$WEB_SYSTEM/$TPL.stpl"
|
||||||
conf="$HOMEDIR/$user/conf/web/shttpd.conf"
|
conf="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.conf"
|
||||||
del_web_config
|
del_web_config
|
||||||
|
|
||||||
# Deleting certificates
|
# Deleting SSL certificates
|
||||||
rm -f $HOMEDIR/$user/conf/web/ssl.$domain.*
|
rm -f $HOMEDIR/$user/conf/web/ssl.$domain.*
|
||||||
rm -f $USER_DATA/ssl/$domain.*
|
rm -f $USER_DATA/ssl/$domain.*
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Checking nginx
|
# Checking proxy
|
||||||
if [ ! -z "$NGINX" ]; then
|
if [ ! -z "$PROXY" ]; then
|
||||||
tpl_file="$WEBTPL/nginx/$NGINX.tpl"
|
tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.tpl"
|
||||||
conf="$HOMEDIR/$user/conf/web/nginx.conf"
|
conf="$HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf"
|
||||||
del_web_config
|
del_web_config
|
||||||
|
|
||||||
if [ "$SSL" = 'yes' ]; then
|
if [ "$SSL" = 'yes' ]; then
|
||||||
tpl_file="$WEBTPL/nginx/$NGINX.stpl"
|
tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.stpl"
|
||||||
conf="$HOMEDIR/$user/conf/web/snginx.conf"
|
conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf"
|
||||||
del_web_config
|
del_web_config
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -98,9 +98,9 @@ fi
|
||||||
rm -rf $HOMEDIR/$user/web/$domain
|
rm -rf $HOMEDIR/$user/web/$domain
|
||||||
|
|
||||||
# Deleting logs
|
# Deleting logs
|
||||||
rm -f /var/log/httpd/domains/$domain.log*
|
rm -f /var/log/$WEB_SYSTEM/domains/$domain.log*
|
||||||
rm -f /var/log/httpd/domains/$domain.bytes
|
rm -f /var/log/$WEB_SYSTEM/domains/$domain.bytes
|
||||||
rm -f /var/log/httpd/domains/$domain.error*
|
rm -f /var/log/$WEB_SYSTEM/domains/$domain.error*
|
||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
@ -110,34 +110,34 @@ rm -f /var/log/httpd/domains/$domain.error*
|
||||||
# Deleting domain
|
# Deleting domain
|
||||||
sed -i "/DOMAIN='$domain'/ d" $USER_DATA/web.conf
|
sed -i "/DOMAIN='$domain'/ d" $USER_DATA/web.conf
|
||||||
|
|
||||||
# Checking last ssl domain
|
# Checking last SSL domain
|
||||||
conf='/etc/httpd/conf.d/vesta.conf'
|
conf="/etc/$WEB_SYSTEM/conf.d/vesta.conf"
|
||||||
ssl_dom=$(grep "SSL='yes'" $USER_DATA/web.conf | wc -l)
|
ssl_dom=$(grep "SSL='yes'" $USER_DATA/web.conf | wc -l)
|
||||||
if [ "$ssl_dom" -eq '0' ]; then
|
if [ "$ssl_dom" -eq '0' ]; then
|
||||||
sed -i "/.*\/$user\/.*shttpd.conf/d" $conf
|
sed -i "/.*\/$user\/.*s$WEB_SYSTEM.conf/d" $conf
|
||||||
rm -f $HOMEDIR/$user/conf/web/shttpd.conf
|
rm -f $HOMEDIR/$user/conf/web/s$WEB_SYSTEM.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Checking last domain
|
# Checking last domain
|
||||||
domains=$(wc -l $USER_DATA/web.conf|cut -f 1 -d ' ')
|
domains=$(wc -l $USER_DATA/web.conf | cut -f1 -d ' ')
|
||||||
if [ "$domains" -eq '0' ]; then
|
if [ "$domains" -eq '0' ]; then
|
||||||
sed -i "/.*\/$user\/.*httpd.conf/d" $conf
|
sed -i "/.*\/$user\/.*$WEB_SYSTEM.conf/d" $conf
|
||||||
rm -f $HOMEDIR/$user/conf/web/httpd.conf
|
rm -f $HOMEDIR/$user/conf/web/$WEB_SYSTEM.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Checking last ssl nginx domain
|
# Checking last SSL proxy
|
||||||
conf='/etc/nginx/conf.d/vesta_users.conf'
|
conf="/etc/$PROXY_SYSTEM/conf.d/vesta.conf"
|
||||||
last_snginx=$(echo "$last_nginx" | grep "SSL='yes'")
|
last_sproxy=$(grep "SSL='yes'" $USER_DATA/web.conf)
|
||||||
if [ -z "$last_snginx" ]; then
|
if [ -z "$last_sproxy" ]; then
|
||||||
sed -i "/.*\/$user\/.*snginx.conf/d" $conf
|
sed -i "/.*\/$user\/.*s$PROXY_SYSTEM.conf/d" $conf
|
||||||
rm -f $HOMEDIR/$user/conf/web/snginx.conf
|
rm -f $HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Checking last nginx domain
|
# Checking last proxy
|
||||||
last_nginx=$(grep -v "NGINX=''" $USER_DATA/web.conf)
|
last_proxy=$(grep -v "PROXY=''" $USER_DATA/web.conf)
|
||||||
if [ -z "$last_nginx" ]; then
|
if [ -z "$last_proxy" ]; then
|
||||||
sed -i "/.*\/$user\/.*nginx.conf/d" $conf
|
sed -i "/.*\/$user\/.*$PROXY_SYSTEM.conf/d" $conf
|
||||||
rm -f $HOMEDIR/$user/conf/web/nginx.conf
|
rm -f $HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Decrease counters
|
# Decrease counters
|
||||||
|
@ -150,7 +150,8 @@ 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-proxy
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Logging
|
# Logging
|
||||||
|
|
|
@ -55,8 +55,8 @@ ALIAS=$(echo "$ALIAS" |\
|
||||||
sed -e "s/^$dom_alias$//g"|\
|
sed -e "s/^$dom_alias$//g"|\
|
||||||
sed -e "/^$/d"|\
|
sed -e "/^$/d"|\
|
||||||
sed -e ':a;N;$!ba;s/\n/,/g')
|
sed -e ':a;N;$!ba;s/\n/,/g')
|
||||||
tpl_file="$WEBTPL/apache/$TPL.tpl"
|
tpl_file="$WEBTPL/$WEB_SYSTEM/$TPL.tpl"
|
||||||
conf="$HOMEDIR/$user/conf/web/httpd.conf"
|
conf="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.conf"
|
||||||
|
|
||||||
# Preparing domain values for the template substitution
|
# Preparing domain values for the template substitution
|
||||||
upd_web_domain_values
|
upd_web_domain_values
|
||||||
|
@ -66,22 +66,22 @@ del_web_config
|
||||||
add_web_config
|
add_web_config
|
||||||
|
|
||||||
if [ "$SSL" = 'yes' ]; then
|
if [ "$SSL" = 'yes' ]; then
|
||||||
tpl_file="$WEBTPL/apache/$TPL.stpl"
|
tpl_file="$WEBTPL/$WEB_SYSTEM/$TPL.stpl"
|
||||||
conf="$HOMEDIR/$user/conf/web/shttpd.conf"
|
conf="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.conf"
|
||||||
del_web_config
|
del_web_config
|
||||||
add_web_config
|
add_web_config
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Checking nginx
|
# Checking proxy
|
||||||
if [ ! -z "$NGINX" ]; then
|
if [ ! -z "$PROXY" ]; then
|
||||||
tpl_file="$WEBTPL/nginx/$NGINX.tpl"
|
tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.tpl"
|
||||||
conf="$HOMEDIR/$user/conf/web/nginx.conf"
|
conf="$HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf"
|
||||||
del_web_config
|
del_web_config
|
||||||
add_web_config
|
add_web_config
|
||||||
|
|
||||||
if [ "$SSL" = 'yes' ]; then
|
if [ "$SSL" = 'yes' ]; then
|
||||||
tpl_file="$WEBTPL/nginx/$NGINX.stpl"
|
tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.stpl"
|
||||||
conf="$HOMEDIR/$user/conf/web/snginx.conf"
|
conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf"
|
||||||
del_web_config
|
del_web_config
|
||||||
add_web_config
|
add_web_config
|
||||||
fi
|
fi
|
||||||
|
@ -100,7 +100,8 @@ decrease_user_value "$user" '$U_WEB_ALIASES'
|
||||||
|
|
||||||
# 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-proxy
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Logging
|
# Logging
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# info: deleting web domain nginx configuration
|
# info: deleting web domain proxy configuration
|
||||||
# options: USER DOMAIN
|
# options: USER DOMAIN
|
||||||
#
|
#
|
||||||
# The function of deleting the virtualhost nginx configuration.
|
# The function of deleting the virtualhost proxy configuration.
|
||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
@ -32,7 +32,7 @@ is_object_valid 'user' 'USER' "$user"
|
||||||
is_object_unsuspended 'user' 'USER' "$user"
|
is_object_unsuspended 'user' 'USER' "$user"
|
||||||
is_object_valid 'web' 'DOMAIN' "$domain"
|
is_object_valid 'web' 'DOMAIN' "$domain"
|
||||||
is_object_unsuspended 'web' 'DOMAIN' "$domain"
|
is_object_unsuspended 'web' 'DOMAIN' "$domain"
|
||||||
is_object_value_exist 'web' 'DOMAIN' "$domain" '$NGINX'
|
is_object_value_exist 'web' 'DOMAIN' "$domain" '$PROXY'
|
||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
@ -41,14 +41,14 @@ is_object_value_exist 'web' 'DOMAIN' "$domain" '$NGINX'
|
||||||
|
|
||||||
# Defining domain parameters
|
# Defining domain parameters
|
||||||
get_domain_values 'web'
|
get_domain_values 'web'
|
||||||
tpl_file="$WEBTPL/nginx/$NGINX.tpl"
|
tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.tpl"
|
||||||
conf="$HOMEDIR/$user/conf/web/nginx.conf"
|
conf="$HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf"
|
||||||
del_web_config
|
del_web_config
|
||||||
|
|
||||||
# Checking ssl
|
# Checking SSL
|
||||||
if [ "$SSL" = 'yes' ]; then
|
if [ "$SSL" = 'yes' ]; then
|
||||||
tpl_file="$WEBTPL/nginx/$NGINX.stpl"
|
tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.stpl"
|
||||||
conf="$HOMEDIR/$user/conf/web/snginx.conf"
|
conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf"
|
||||||
del_web_config
|
del_web_config
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -58,30 +58,32 @@ fi
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
|
||||||
# Update config
|
# Update config
|
||||||
update_object_value 'web' 'DOMAIN' "$domain" '$NGINX' ''
|
update_object_value 'web' 'DOMAIN' "$domain" '$PROXY' ''
|
||||||
update_object_value 'web' 'DOMAIN' "$domain" '$NGINX_EXT' ''
|
update_object_value 'web' 'DOMAIN' "$domain" '$PROXY_EXT' ''
|
||||||
|
|
||||||
# Checking last nginx domain
|
|
||||||
conf='/etc/nginx/conf.d/vesta_users.conf'
|
# Checking last SSL proxy
|
||||||
last_nginx=$(grep -v "NGINX=''" $USER_DATA/web.conf)
|
conf="/etc/$PROXY_SYSTEM/conf.d/vesta.conf"
|
||||||
last_snginx=$(echo "$last_nginx" | grep "SSL='yes'")
|
last_sproxy=$(grep "SSL='yes'" $USER_DATA/web.conf)
|
||||||
if [ -z "$last_snginx" ]; then
|
if [ -z "$last_sproxy" ]; then
|
||||||
sed -i "/$user\/conf\/web\/snginx.conf/d" $conf
|
sed -i "/.*\/$user\/.*s$PROXY_SYSTEM.conf/d" $conf
|
||||||
rm -f $HOMEDIR/$user/conf/web/snginx.conf
|
rm -f $HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ -z "$last_nginx" ]; then
|
# Checking last proxy
|
||||||
sed -i "/$user\/conf\/web\/nginx.conf/d" $conf
|
last_proxy=$(grep -v "PROXY=''" $USER_DATA/web.conf)
|
||||||
rm -f $HOMEDIR/$user/conf/web/nginx.conf
|
if [ -z "$last_proxy" ]; then
|
||||||
|
sed -i "/.*\/$user\/.*$PROXY_SYSTEM.conf/d" $conf
|
||||||
|
rm -f $HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Restart web server
|
# Restart proxy server
|
||||||
if [ "$restart" != 'no' ]; then
|
if [ "$restart" != 'no' ]; then
|
||||||
$BIN/v-restart-web "$EVENT"
|
$BIN/v-restart-proxy
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Logging
|
# Logging
|
||||||
log_history "disabled nginx support for $domain"
|
log_history "disabled proxy support for $domain"
|
||||||
log_event "$OK" "$EVENT"
|
log_event "$OK" "$EVENT"
|
||||||
|
|
||||||
exit
|
exit
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# info: delete web domain ssl support
|
# info: delete web domain SSL support
|
||||||
# options: USER DOMAIN
|
# options: USER DOMAIN
|
||||||
#
|
#
|
||||||
# The function disable https support and deletes SSL certificates.
|
# The function disable https support and deletes SSL certificates.
|
||||||
|
@ -41,16 +41,16 @@ is_object_value_exist 'web' 'DOMAIN' "$domain" '$SSL'
|
||||||
|
|
||||||
# Parsing domain values
|
# Parsing domain values
|
||||||
get_domain_values 'web'
|
get_domain_values 'web'
|
||||||
conf="$HOMEDIR/$user/conf/web/shttpd.conf"
|
conf="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.conf"
|
||||||
tpl_file="$WEBTPL/apache/$TPL.stpl"
|
tpl_file="$WEBTPL/$WEB_SYSTEM/$TPL.stpl"
|
||||||
|
|
||||||
# Deleting domain
|
# Deleting domain
|
||||||
del_web_config
|
del_web_config
|
||||||
|
|
||||||
# Checking nginx
|
# Checking proxy
|
||||||
if [ ! -z "$NGINX" ]; then
|
if [ ! -z "$PROXY" ]; then
|
||||||
tpl_file="$WEBTPL/nginx/$NGINX.stpl"
|
conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf"
|
||||||
conf="$HOMEDIR/$user/conf/web/snginx.conf"
|
tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.stpl"
|
||||||
del_web_config
|
del_web_config
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -68,21 +68,22 @@ chown -R $user:$user $tmpdir
|
||||||
# Update config
|
# Update config
|
||||||
update_object_value 'web' 'DOMAIN' "$domain" '$SSL' 'no'
|
update_object_value 'web' 'DOMAIN' "$domain" '$SSL' 'no'
|
||||||
|
|
||||||
# Checking last ssl domain
|
# Checking last SSL domain
|
||||||
ssl_dom=$(grep "SSL='yes'" $USER_DATA/web.conf)
|
ssl_dom=$(grep "SSL='yes'" $USER_DATA/web.conf)
|
||||||
conf='/etc/httpd/conf.d/vesta.conf'
|
conf="/etc/$WEB_SYSTEM/conf.d/vesta.conf"
|
||||||
if [ -z "$ssl_dom" ]; then
|
if [ -z "$ssl_dom" ]; then
|
||||||
sed -i "/.*\/$user\/.*shttpd.conf/d" $conf
|
sed -i "/.*\/$user\/.*s$WEB_SYSTEM.conf/d" $conf
|
||||||
rm -f $HOMEDIR/$user/conf/web/shttpd.conf
|
rm -f $HOMEDIR/$user/conf/web/s$WEB_SYSTEM.conf
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Checking last nginx domain
|
# Checking proxy
|
||||||
conf='/etc/nginx/conf.d/vesta_users.conf'
|
if [ ! -z "$PROXY_SYSTEM" ]; then
|
||||||
last_nginx=$(grep -v "NGINX=''" $USER_DATA/web.conf)
|
conf="/etc/$PROXY_SYSTEM/conf.d/vesta.conf"
|
||||||
last_snginx=$(echo "$last_nginx" | grep "SSL='yes'")
|
if [ -z "$ssl_dom" ]; then
|
||||||
if [ -z "$last_snginx" ]; then
|
sed -i "/.*\/$user\/.*s$PROXY_SYSTEM.conf/d" $conf
|
||||||
sed -i "/.*\/$user\/.*snginx.conf/d" $conf
|
rm -f $HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf
|
||||||
rm -f $HOMEDIR/$user/conf/web/snginx.conf
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Decreasing domain value
|
# Decreasing domain value
|
||||||
|
@ -90,7 +91,8 @@ decrease_user_value "$user" '$U_WEB_SSL'
|
||||||
|
|
||||||
# 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-proxy
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Logging
|
# Logging
|
||||||
|
|
|
@ -44,7 +44,8 @@ done
|
||||||
|
|
||||||
# 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-proxy
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Logging
|
# Logging
|
||||||
|
|
|
@ -72,15 +72,16 @@ is_object_valid 'user' 'USER' "$user"
|
||||||
conf=$USER_DATA/user.conf
|
conf=$USER_DATA/user.conf
|
||||||
|
|
||||||
# Defining fileds to select
|
# Defining fileds to select
|
||||||
fields='$USER $FNAME $LNAME $PACKAGE $TEMPLATE $WEB_DOMAINS $WEB_ALIASES
|
fields='$USER $FNAME $LNAME $PACKAGE $WEB_TEMPLATE $PROXY_TEMPLATE
|
||||||
$DNS_DOMAINS $DNS_RECORDS $MAIL_DOMAINS $MAIL_ACCOUNTS $DATABASES
|
$DNS_TEMPLATE $WEB_DOMAINS $WEB_ALIASES $DNS_DOMAINS $DNS_RECORDS
|
||||||
$CRON_JOBS $DISK_QUOTA $BANDWIDTH $NS $SHELL $BACKUPS $CONTACT
|
$MAIL_DOMAINS $MAIL_ACCOUNTS $DATABASES $CRON_JOBS $DISK_QUOTA $BANDWIDTH
|
||||||
$CRON_REPORTS $RKEY $SUSPENDED $SUSPENDED_USERS $SUSPENDED_WEB
|
$NS $SHELL $BACKUPS $CONTACT $CRON_REPORTS $RKEY $SUSPENDED
|
||||||
$SUSPENDED_DNS $SUSPENDED_MAIL $SUSPENDED_DB $SUSPENDED_CRON $IP_AVAIL
|
$SUSPENDED_USERS $SUSPENDED_WEB $SUSPENDED_DNS $SUSPENDED_MAIL
|
||||||
$IP_OWNED $U_USERS $U_DISK $U_DISK_DIRS $U_DISK_WEB $U_DISK_MAIL $U_DISK_DB
|
$SUSPENDED_DB $SUSPENDED_CRON $IP_AVAIL $IP_OWNED $U_USERS $U_DISK
|
||||||
$U_BANDWIDTH $U_WEB_DOMAINS $U_WEB_SSL $U_WEB_ALIASES $U_DNS_DOMAINS
|
$U_DISK_DIRS $U_DISK_WEB $U_DISK_MAIL $U_DISK_DB $U_BANDWIDTH
|
||||||
$U_DNS_RECORDS $U_MAIL_DOMAINS $U_MAIL_DKIM $U_MAIL_ACCOUNTS $U_DATABASES
|
$U_WEB_DOMAINS $U_WEB_SSL $U_WEB_ALIASES $U_DNS_DOMAINS $U_DNS_RECORDS
|
||||||
$U_CRON_JOBS $U_BACKUPS $LANGUAGE $TIME $DATE'
|
$U_MAIL_DOMAINS $U_MAIL_DKIM $U_MAIL_ACCOUNTS $U_DATABASES $U_CRON_JOBS
|
||||||
|
$U_BACKUPS $LANGUAGE $TIME $DATE'
|
||||||
|
|
||||||
# Listing user
|
# Listing user
|
||||||
case $format in
|
case $format in
|
||||||
|
|
|
@ -72,9 +72,10 @@ is_package_valid
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
|
||||||
# Defining fileds to select
|
# Defining fileds to select
|
||||||
fields='$PACKAGE $TEMPLATE $WEB_DOMAINS $WEB_ALIASES $DNS_DOMAINS $DNS_RECORDS
|
fields='$PACKAGE $WEB_TEMPLATE $PROXY_TEMPLATE $DNS_TEMPLATE $WEB_DOMAINS
|
||||||
$MAIL_DOMAINS $MAIL_ACCOUNTS $DATABASES $CRON_JOBS $DISK_QUOTA $BANDWIDTH
|
$WEB_ALIASES $DNS_DOMAINS $DNS_RECORDS $MAIL_DOMAINS $MAIL_ACCOUNTS
|
||||||
$NS $SHELL $BACKUPS $TIME $DATE'
|
$DATABASES $CRON_JOBS $DISK_QUOTA $BANDWIDTH $NS $SHELL $BACKUPS $TIME
|
||||||
|
$DATE'
|
||||||
|
|
||||||
# Listing ip
|
# Listing ip
|
||||||
case $format in
|
case $format in
|
||||||
|
|
|
@ -71,9 +71,10 @@ shell_list_pkgs() {
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
|
||||||
# Defining fields
|
# Defining fields
|
||||||
fields='$PACKAGE $TEMPLATE $WEB_DOMAINS $WEB_ALIASES $DNS_DOMAINS $DNS_RECORDS
|
fields='$PACKAGE $WEB_TEMPLATE $PROXY_TEMPLATE $DNS_TEMPLATE $WEB_DOMAINS
|
||||||
$MAIL_DOMAINS $MAIL_ACCOUNTS $DATABASES $CRON_JOBS $DISK_QUOTA $BANDWIDTH
|
$WEB_ALIASES $DNS_DOMAINS $DNS_RECORDS $MAIL_DOMAINS $MAIL_ACCOUNTS
|
||||||
$NS $SHELL $BACKUPS $TIME $DATE'
|
$DATABASES $CRON_JOBS $DISK_QUOTA $BANDWIDTH $NS $SHELL $BACKUPS $TIME
|
||||||
|
$DATE'
|
||||||
|
|
||||||
# Listing domains
|
# Listing domains
|
||||||
case $format in
|
case $format in
|
||||||
|
|
|
@ -73,11 +73,11 @@ shell_list_users() {
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
|
||||||
# Defining fileds to select
|
# Defining fileds to select
|
||||||
fields="\$USER \$FNAME \$LNAME \$PACKAGE \$TEMPLATE \$WEB_DOMAINS"
|
fields="\$USER \$FNAME \$LNAME \$PACKAGE \$WEB_TEMPLATE \$PROXY_TEMPLATE"
|
||||||
fields="$fields \$WEB_ALIASES \$DNS_DOMAINS \$DNS_RECORDS \$MAIL_DOMAINS"
|
fields="$fields \$DNS_TEMPLATE \$WEB_DOMAINS \$WEB_ALIASES \$DNS_DOMAINS"
|
||||||
fields="$fields \$MAIL_ACCOUNTS \$DATABASES \$CRON_JOBS \$DISK_QUOTA"
|
fields="$fields \$DNS_RECORDS \$MAIL_DOMAINS \$MAIL_ACCOUNTS \$DATABASES"
|
||||||
fields="$fields \$BANDWIDTH \$NS \$SHELL \$BACKUPS \$CONTACT"
|
fields="$fields \$CRON_JOBS \$DISK_QUOTA \$BANDWIDTH \$NS \$SHELL \$BACKUPS"
|
||||||
fields="$fields \$CRON_REPORTS \$RKEY \$SUSPENDED \$SUSPENDED_USERS"
|
fields="$fields \$CONTACT \$CRON_REPORTS \$RKEY \$SUSPENDED \$SUSPENDED_USERS"
|
||||||
fields="$fields \$SUSPENDED_WEB \$SUSPENDED_DNS \$SUSPENDED_MAIL"
|
fields="$fields \$SUSPENDED_WEB \$SUSPENDED_DNS \$SUSPENDED_MAIL"
|
||||||
fields="$fields \$SUSPENDED_DB \$SUSPENDED_CRON \$IP_AVAIL \$IP_OWNED"
|
fields="$fields \$SUSPENDED_DB \$SUSPENDED_CRON \$IP_AVAIL \$IP_OWNED"
|
||||||
fields="$fields \$U_USERS \$U_DISK \$U_DISK_DIRS \$U_DISK_WEB \$U_DISK_MAIL"
|
fields="$fields \$U_USERS \$U_DISK \$U_DISK_DIRS \$U_DISK_WEB \$U_DISK_MAIL"
|
||||||
|
|
|
@ -76,7 +76,7 @@ conf=$USER_DATA/web.conf
|
||||||
|
|
||||||
# Defining fileds to select
|
# Defining fileds to select
|
||||||
fields='$DOMAIN $IP $IP6 $U_DISK $U_BANDWIDTH $TPL $ALIAS $STATS $STATS_USER
|
fields='$DOMAIN $IP $IP6 $U_DISK $U_BANDWIDTH $TPL $ALIAS $STATS $STATS_USER
|
||||||
$SSL $SSL_HOME $FTP_USER $NGINX $NGINX_EXT $SUSPENDED $TIME $DATE'
|
$SSL $SSL_HOME $FTP_USER $PROXY $PROXY_EXT $SUSPENDED $TIME $DATE'
|
||||||
|
|
||||||
# Listing domains
|
# Listing domains
|
||||||
case $format in
|
case $format in
|
||||||
|
|
|
@ -36,7 +36,7 @@ conf=$USER_DATA/web.conf
|
||||||
# Defining fileds to select
|
# Defining fileds to select
|
||||||
fields="\$DOMAIN \$IP \$IP6 \$U_DISK \$U_BANDWIDTH \$TPL \$ALIAS"
|
fields="\$DOMAIN \$IP \$IP6 \$U_DISK \$U_BANDWIDTH \$TPL \$ALIAS"
|
||||||
fields="$fields \$STATS \$STATS_USER \$SSL \$SSL_HOME \$FTP_USER"
|
fields="$fields \$STATS \$STATS_USER \$SSL \$SSL_HOME \$FTP_USER"
|
||||||
fields="$fields \$NGINX \$NGINX_EXT \$SUSPENDED \$TIME \$DATE"
|
fields="$fields \$PROXY \$PROXY_EXT \$SUSPENDED \$TIME \$DATE"
|
||||||
|
|
||||||
# Listing domains
|
# Listing domains
|
||||||
case $format in
|
case $format in
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# info: list web domains and nginx key
|
# info: list web domains and proxy key
|
||||||
# options: USER [FORMAT]
|
# options: USER [FORMAT]
|
||||||
#
|
#
|
||||||
# The function for obtaining the list of domains with nginx parameter
|
# The function for obtaining the list of domains with proxy parameter
|
||||||
# displayed. This call was arranged for filling in the lack of information by
|
# displayed. This call was arranged for filling in the lack of information by
|
||||||
# applying v-list-web-domains call in the shell format.
|
# applying v-list-web-domains call in the shell format.
|
||||||
|
|
||||||
|
@ -36,7 +36,7 @@ is_object_valid 'user' 'USER' "$user"
|
||||||
conf=$USER_DATA/web.conf
|
conf=$USER_DATA/web.conf
|
||||||
|
|
||||||
# Defining fileds to select
|
# Defining fileds to select
|
||||||
fields="\$DOMAIN \$NGINX \$NGINX_EXT"
|
fields="\$DOMAIN \$PROXY \$PROXY_EXT"
|
||||||
|
|
||||||
# Listing domains
|
# Listing domains
|
||||||
case $format in
|
case $format in
|
|
@ -2,7 +2,7 @@
|
||||||
# info: list web templates
|
# info: list web templates
|
||||||
# options: USER [FORMAT]
|
# options: USER [FORMAT]
|
||||||
#
|
#
|
||||||
# The function for obtaining the list of apache templates available to a user.
|
# The function for obtaining the list of web templates available to a user.
|
||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
@ -13,11 +13,12 @@
|
||||||
format=${1-shell}
|
format=${1-shell}
|
||||||
|
|
||||||
# Includes
|
# Includes
|
||||||
|
source $VESTA/conf/vesta.conf
|
||||||
source $VESTA/func/main.sh
|
source $VESTA/func/main.sh
|
||||||
|
|
||||||
# Json function
|
# Json function
|
||||||
json_list_wtpl() {
|
json_list_wtpl() {
|
||||||
templates=$(ls -t $WEBTPL/apache | cut -f 1 -d '.' |sort -u )
|
templates=$(ls -t $WEBTPL/$WEB_SYSTEM | cut -f 1 -d '.' |sort -u )
|
||||||
t_counter=$(echo "$templates" | wc -w)
|
t_counter=$(echo "$templates" | wc -w)
|
||||||
i=1
|
i=1
|
||||||
echo '['
|
echo '['
|
||||||
|
@ -34,7 +35,7 @@ json_list_wtpl() {
|
||||||
|
|
||||||
# Shell function
|
# Shell function
|
||||||
shell_list_wtpl() {
|
shell_list_wtpl() {
|
||||||
templates=$(ls -t $WEBTPL/apache | cut -f 1 -d '.' |sort -u )
|
templates=$(ls -t $WEBTPL/$WEB_SYSTEM | cut -f 1 -d '.' |sort -u )
|
||||||
if [ -z "$nohead" ]; then
|
if [ -z "$nohead" ]; then
|
||||||
echo "Templates"
|
echo "Templates"
|
||||||
echo "----------"
|
echo "----------"
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# info: listing nginx templates
|
# info: listing proxy templates
|
||||||
# options: [FORMAT]
|
# options: [FORMAT]
|
||||||
#
|
#
|
||||||
# The function for obtaining the list of nginx templates available to a user.
|
# The function for obtaining the list of proxy templates available to a user.
|
||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
@ -13,11 +13,11 @@
|
||||||
format=${1-shell}
|
format=${1-shell}
|
||||||
|
|
||||||
# Includes
|
# Includes
|
||||||
|
source $VESTA/conf/vesta.conf
|
||||||
source $VESTA/func/main.sh
|
source $VESTA/func/main.sh
|
||||||
|
|
||||||
# Json function
|
# Json function
|
||||||
json_list_wtpl() {
|
json_list_wtpl() {
|
||||||
templates=$(ls -t $WEBTPL/nginx | cut -f 1 -d '.' |sort -u )
|
|
||||||
t_counter=$(echo "$templates" | wc -w)
|
t_counter=$(echo "$templates" | wc -w)
|
||||||
i=1
|
i=1
|
||||||
echo '['
|
echo '['
|
||||||
|
@ -34,7 +34,6 @@ json_list_wtpl() {
|
||||||
|
|
||||||
# Shell function
|
# Shell function
|
||||||
shell_list_wtpl() {
|
shell_list_wtpl() {
|
||||||
templates=$(ls -t $WEBTPL/nginx | cut -f 1 -d '.' |sort -u )
|
|
||||||
if [ -z "$nohead" ]; then
|
if [ -z "$nohead" ]; then
|
||||||
echo "Templates"
|
echo "Templates"
|
||||||
echo "----------"
|
echo "----------"
|
||||||
|
@ -49,6 +48,12 @@ shell_list_wtpl() {
|
||||||
# Action #
|
# Action #
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
|
||||||
|
# Proxy templates
|
||||||
|
templates=$(ls -t $WEBTPL/$PROXY_SYSTEM |\
|
||||||
|
cut -f1 -d . |\
|
||||||
|
grep -v proxy_ip |\
|
||||||
|
sort -u )
|
||||||
|
|
||||||
# Listing domains
|
# Listing domains
|
||||||
case $format in
|
case $format in
|
||||||
json) json_list_wtpl ;;
|
json) json_list_wtpl ;;
|
|
@ -55,64 +55,60 @@ for domain in $(shell_list); do
|
||||||
done
|
done
|
||||||
|
|
||||||
# Config path
|
# Config path
|
||||||
httpd_conf='/etc/httpd/conf.d/vesta.conf'
|
web_conf="/etc/$WEB_SYSTEM/conf.d/vesta.conf"
|
||||||
nginx_conf='/etc/nginx/conf.d/vesta_users.conf'
|
proxy_conf="/etc/$PROXY_SYSTEM/conf.d/vesta.conf"
|
||||||
|
|
||||||
# Checking if there is at least 1 domain
|
# Checking if there is at least 1 domain
|
||||||
if [ "$domain_counter" -lt 1 ]; then
|
if [ "$domain_counter" -lt 1 ]; then
|
||||||
|
|
||||||
# Deleting web configs
|
# Deleting web configs
|
||||||
rm -f $HOMEDIR/$user/conf/web/*
|
rm -f $HOMEDIR/$user/conf/web/*
|
||||||
sed -i "/.*\/$user\/.*httpd.conf/d" $httpd_conf
|
sed -i "/.*\/$user\/.*$WEB_SYSTEM.conf/d" $web_conf
|
||||||
if [ -e "$nginx_conf" ]; then
|
if [ -e "$proxy_conf" ]; then
|
||||||
sed -i "/.*\/$user\/.*nginx.conf/d" $nginx_conf
|
sed -i "/.*\/$user\/.*$WEB_SYSTEM.conf/d" $proxy_conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
else
|
else
|
||||||
|
|
||||||
# Renaming tmp config
|
# Renaming tmp config
|
||||||
tmp_conf="$HOMEDIR/$user/conf/web/tmp_httpd.conf"
|
tmp_conf="$HOMEDIR/$user/conf/web/tmp_$WEB_SYSTEM.conf"
|
||||||
conf="$HOMEDIR/$user/conf/web/httpd.conf"
|
conf="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.conf"
|
||||||
mv $tmp_conf $conf
|
mv $tmp_conf $conf
|
||||||
|
|
||||||
# Checking httpd.conf include
|
# Checking include
|
||||||
httpd_include=$(grep "$conf" $httpd_conf )
|
web_include=$(grep "$conf" $web_conf )
|
||||||
if [ -z "$httpd_include" ]; then
|
if [ -z "$web_include" ]; then
|
||||||
echo "Include $conf" >> $httpd_conf
|
echo "Include $conf" >> $web_conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Checking ssl
|
# Checking SSL
|
||||||
if [ "$ssl_change" = 'yes' ]; then
|
if [ "$ssl_change" = 'yes' ]; then
|
||||||
tmp_conf="$HOMEDIR/$user/conf/web/tmp_shttpd.conf"
|
tmp_conf="$HOMEDIR/$user/conf/web/tmp_s$WEB_SYSTEM.conf"
|
||||||
conf="$HOMEDIR/$user/conf/web/shttpd.conf"
|
conf="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.conf"
|
||||||
mv $tmp_conf $conf
|
mv $tmp_conf $conf
|
||||||
fi
|
fi
|
||||||
|
ssl_include=$(grep "$conf" $web_conf )
|
||||||
# Checking ssl include
|
if [ -z "$ssl_include" ]; then
|
||||||
httpd_include=$(grep "$conf" $httpd_conf )
|
echo "Include $conf" >> $web_conf
|
||||||
if [ -z "$httpd_include" ]; then
|
|
||||||
echo "Include $conf" >> $httpd_conf
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Checking nginx
|
# Checking proxy
|
||||||
if [ "$ngix_change" = 'yes' ]; then
|
if [ "$proxy_change" = 'yes' ]; then
|
||||||
tmp_conf="$HOMEDIR/$user/conf/web/tmp_nginx.conf"
|
tmp_conf="$HOMEDIR/$user/conf/web/tmp_$PROXY_SYSTEM.conf"
|
||||||
conf="$HOMEDIR/$user/conf/web/nginx.conf"
|
conf="$HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf"
|
||||||
mv $tmp_conf $conf
|
mv $tmp_conf $conf
|
||||||
fi
|
fi
|
||||||
nginx_include=$(grep "$conf" $nginx_conf )
|
proxy_include=$(grep "$conf" $proxy_conf )
|
||||||
if [ -z "$nginx_include" ]; then
|
if [ -z "$proxy_include" ]; then
|
||||||
echo "include $conf;" >> $nginx_conf
|
echo "include $conf;" >> $proxy_conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Checking ssl for nginx
|
# Checking SSL proxy
|
||||||
if [ "$ngix_change" = 'yes' ] && [ "$ssl_change" = 'yes' ]; then
|
if [ "$proxy_change" = 'yes' ] && [ "$ssl_change" = 'yes' ]; then
|
||||||
tmp_conf="$HOMEDIR/$user/conf/web/tmp_snginx.conf"
|
tmp_conf="$HOMEDIR/$user/conf/web/tmp_s$PROXY_SYSTEM.conf"
|
||||||
conf="$HOMEDIR/$user/conf/web/snginx.conf"
|
conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf"
|
||||||
mv $tmp_conf $conf
|
mv $tmp_conf $conf
|
||||||
nginx_include=$(grep "$conf" $nginx_conf )
|
proxy_include=$(grep "$conf" $proxy_conf )
|
||||||
if [ -z "$nginx_include" ]; then
|
if [ -z "$proxy_include" ]; then
|
||||||
echo "include $conf;" >> $nginx_conf
|
echo "include $conf;" >> $proxy_conf
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -130,7 +126,8 @@ update_user_value "$user" '$U_WEB_ALIASES' "$user_aliases"
|
||||||
|
|
||||||
# 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-proxy
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Logging
|
# Logging
|
||||||
|
|
|
@ -18,11 +18,15 @@ source $VESTA/func/main.sh
|
||||||
# Action #
|
# Action #
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
|
||||||
# Parsing config / or just source config
|
if [ ! -z "$CRON_SYSTEM" ]; then
|
||||||
if [ "$CRON_SYSTEM" = 'crond' ]; then
|
/etc/init.d/$CRON_SYSTEM status >/dev/null 2>&1
|
||||||
/etc/init.d/crond 'reload' >/dev/null 2>&1
|
if [ $? -eq 0 ]; then
|
||||||
if [ $? -ne 0 ]; then
|
/etc/init.d/$CRON_SYSTEM reload >/dev/null 2>&1
|
||||||
/etc/init.d/crond 'restart' >/dev/null 2>&1
|
if [ $? -ne 0 ]; then
|
||||||
|
exit $E_RESTART
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
/etc/init.d/$CRON_SYSTEM start >/dev/null 2>&1
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
exit $E_RESTART
|
exit $E_RESTART
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -18,10 +18,15 @@ source $VESTA/func/main.sh
|
||||||
# Action #
|
# Action #
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
|
||||||
if [ "$DNS_SYSTEM" = 'bind' ]; then
|
if [ ! -z "$DNS_SYSTEM" ]; then
|
||||||
/etc/init.d/named reload >/dev/null 2>&1
|
/etc/init.d/$DNS_SYSTEM status >/dev/null 2>&1
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
/etc/init.d/named restart >/dev/null 2>&1
|
/etc/init.d/$DNS_SYSTEM reload >/dev/null 2>&1
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
exit $E_RESTART
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
/etc/init.d/$DNS_SYSTEM start >/dev/null 2>&1
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
exit $E_RESTART
|
exit $E_RESTART
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -18,22 +18,15 @@ source $VESTA/func/main.sh
|
||||||
# Action #
|
# Action #
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
|
||||||
# Vsftpd
|
if [ ! -z "$FTP_SYSTEM" ]; then
|
||||||
if [ "$FTP_SYSTEM" = 'vsftpd' ]; then
|
/etc/init.d/$FTP_SYSTEM status >/dev/null 2>&1
|
||||||
/etc/init.d/vsftpd reload >/dev/null 2>&1
|
if [ $? -eq 0 ]; then
|
||||||
if [ $? -ne 0 ]; then
|
/etc/init.d/$FTP_SYSTEM reload >/dev/null 2>&1
|
||||||
/etc/init.d/vsftpd restart >/dev/null 2>&1
|
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
exit $E_RESTART
|
exit $E_RESTART
|
||||||
fi
|
fi
|
||||||
fi
|
else
|
||||||
fi
|
/etc/init.d/$FTP_SYSTEM start >/dev/null 2>&1
|
||||||
|
|
||||||
# ProFTPD
|
|
||||||
if [ "$FTP_SYSTEM" = 'proftpd' ]; then
|
|
||||||
/etc/init.d/proftpd reload >/dev/null 2>&1
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
/etc/init.d/proftpd restart >/dev/null 2>&1
|
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
exit $E_RESTART
|
exit $E_RESTART
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -18,10 +18,15 @@ source $VESTA/func/main.sh
|
||||||
# Action #
|
# Action #
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
|
||||||
if [ "$MAIL_SYSTEM" = 'exim' ]; then
|
if [ ! -z "$MAIL_SYSTEM" ]; then
|
||||||
/etc/init.d/exim reload >/dev/null 2>&1
|
/etc/init.d/$MAIL_SYSTEM status >/dev/null 2>&1
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
/etc/init.d/exim restart >/dev/null 2>&1
|
/etc/init.d/$MAIL_SYSTEM reload >/dev/null 2>&1
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
exit $E_RESTART
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
/etc/init.d/$MAIL_SYSTEM start >/dev/null 2>&1
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
exit $E_RESTART
|
exit $E_RESTART
|
||||||
fi
|
fi
|
||||||
|
|
41
bin/v-restart-proxy
Executable file
41
bin/v-restart-proxy
Executable file
|
@ -0,0 +1,41 @@
|
||||||
|
#!/bin/bash
|
||||||
|
# info: restart proxy server
|
||||||
|
# options: NONE
|
||||||
|
#
|
||||||
|
# The function reloads proxy server configuration.
|
||||||
|
|
||||||
|
|
||||||
|
#----------------------------------------------------------#
|
||||||
|
# Variable&Function #
|
||||||
|
#----------------------------------------------------------#
|
||||||
|
|
||||||
|
# Includes
|
||||||
|
source $VESTA/conf/vesta.conf
|
||||||
|
source $VESTA/func/main.sh
|
||||||
|
|
||||||
|
|
||||||
|
#----------------------------------------------------------#
|
||||||
|
# Action #
|
||||||
|
#----------------------------------------------------------#
|
||||||
|
|
||||||
|
if [ ! -z "$PROXY_SYSTEM" ]; then
|
||||||
|
/etc/init.d/$PROXY_SYSTEM status >/dev/null 2>&1
|
||||||
|
if [ $? -eq 0 ]; then
|
||||||
|
/etc/init.d/$PROXY_SYSTEM reload >/dev/null 2>&1
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
exit $E_RESTART
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
/etc/init.d/$PROXY_SYSTEM start >/dev/null 2>&1
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
exit $E_RESTART
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
#----------------------------------------------------------#
|
||||||
|
# Vesta #
|
||||||
|
#----------------------------------------------------------#
|
||||||
|
|
||||||
|
exit
|
|
@ -1,5 +1,5 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
# info: restart web services
|
# info: restart web server
|
||||||
# options: NONE
|
# options: NONE
|
||||||
#
|
#
|
||||||
# The function reloads web server configuration.
|
# The function reloads web server configuration.
|
||||||
|
@ -18,37 +18,21 @@ source $VESTA/func/main.sh
|
||||||
# Action #
|
# Action #
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
|
||||||
if [ "$WEB_SYSTEM" = 'apache' ]; then
|
if [ ! -z "$WEB_SYSTEM" ]; then
|
||||||
/etc/init.d/httpd status >/dev/null 2>&1
|
/etc/init.d/$WEB_SYSTEM status >/dev/null 2>&1
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
/etc/init.d/httpd graceful >/dev/null 2>&1
|
/etc/init.d/$WEB_SYSTEM reload >/dev/null 2>&1
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
exit $E_RESTART
|
exit $E_RESTART
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
/etc/init.d/httpd start >/dev/null 2>&1
|
/etc/init.d/$WEB_SYSTEM start >/dev/null 2>&1
|
||||||
if [ $? -ne 0 ]; then
|
if [ $? -ne 0 ]; then
|
||||||
exit $E_RESTART
|
exit $E_RESTART
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$PROXY_SYSTEM" = 'nginx' ]; then
|
|
||||||
/etc/init.d/nginx status >/dev/null 2>&1
|
|
||||||
if [ $? -eq 0 ]; then
|
|
||||||
/etc/init.d/nginx reload >/dev/null 2>&1
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
exit $E_RESTART
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
/etc/init.d/nginx start >/dev/null 2>&1
|
|
||||||
if [ $? -ne 0 ]; then
|
|
||||||
exit $E_RESTART
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
# Vesta #
|
# Vesta #
|
||||||
|
|
|
@ -244,21 +244,11 @@ if [ "$web" != 'no' ]; then
|
||||||
echo "$IP" > $tmpdir/ip_mapping.$domain
|
echo "$IP" > $tmpdir/ip_mapping.$domain
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check apache template
|
# Check web template
|
||||||
check_tpl=$(is_apache_template_valid)
|
check_tpl=$(is_web_template_valid)
|
||||||
if [ ! -z "$check_tpl" ]; then
|
if [ ! -e "$WEBTPL/$WEB_SYSTEM/$TPL.tpl" ]; then
|
||||||
templates=$(ls -t $VESTA/data/templates/web/ |\
|
TPL="default"
|
||||||
grep 'apache' |\
|
if [ ! -e "$WEBTPL/$WEB_SYSTEM/$TPL.tpl" ]; then
|
||||||
grep '\.tpl' |\
|
|
||||||
cut -f 2 -d '_' |\
|
|
||||||
cut -f 1 -d '.')
|
|
||||||
if [ ! -z "$(echo $templates |grep default)" ]; then
|
|
||||||
TPL=$(echo "$templates" |grep default |head -n1)
|
|
||||||
else
|
|
||||||
TPL=$("$templates" |head -n1)
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$TPL" ]; then
|
|
||||||
echo "Error: no avaiable web template"
|
echo "Error: no avaiable web template"
|
||||||
echo "No available web template" |\
|
echo "No available web template" |\
|
||||||
$send_mail -s "$subj" $email
|
$send_mail -s "$subj" $email
|
||||||
|
@ -267,24 +257,13 @@ if [ "$web" != 'no' ]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check nginx template
|
# Check proxy template
|
||||||
if [ ! -z "$NGINX" ]; then
|
if [ ! -z "$PROXY" ]; then
|
||||||
check_tpl=$(is_nginx_template_valid)
|
if [ ! -e "$WEBTPL/$PROXY_SYSTEM/$TPL.tpl" ]; then
|
||||||
if [ ! -z "$check_tpl" ]; then
|
PROXY="default"
|
||||||
templates=$(ls -t $VESTA/data/templates/web/ |\
|
if [ ! -e "$WEBTPL/$PROXY_SYSTEM/$TPL.tpl" ]; then
|
||||||
grep 'nginx' |\
|
echo "Error: no avaiable proxy template"
|
||||||
grep '\.tpl' |\
|
echo "No available proxy tpl" |\
|
||||||
cut -f 2 -d '_' |\
|
|
||||||
cut -f 1 -d '.')
|
|
||||||
if [ ! -z "$(echo $templates |grep default)" ]; then
|
|
||||||
NGINX=$(echo "$templates" |grep default |head -n1)
|
|
||||||
else
|
|
||||||
NGINX=$("$templates" |head -n1)
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ -z "$NGINX" ]; then
|
|
||||||
echo "Error: no avaiable nginx template"
|
|
||||||
echo "No available nginx tpl" |\
|
|
||||||
$send_mail -s "$subj" $email
|
$send_mail -s "$subj" $email
|
||||||
log_event "$E_NOTEXIST" "$EVENT"
|
log_event "$E_NOTEXIST" "$EVENT"
|
||||||
exit $E_NOTEXIST
|
exit $E_NOTEXIST
|
||||||
|
@ -302,8 +281,8 @@ if [ "$web" != 'no' ]; then
|
||||||
|
|
||||||
str="DOMAIN='$domain' IP='$IP' IP6='$IP6' ALIAS='$ALIAS'"
|
str="DOMAIN='$domain' IP='$IP' IP6='$IP6' ALIAS='$ALIAS'"
|
||||||
str="$str TPL='$TPL' SSL='$SSL' SSL_HOME='$SSL_HOME'"
|
str="$str TPL='$TPL' SSL='$SSL' SSL_HOME='$SSL_HOME'"
|
||||||
str="$str FTP_USER='$FTP_USER' FTP_MD5='$FTP_MD5' NGINX='$NGINX'"
|
str="$str FTP_USER='$FTP_USER' FTP_MD5='$FTP_MD5' PROXY='$PROXY'"
|
||||||
str="$str NGINX_EXT='$NGINX_EXT' STATS='$STATS'"
|
str="$str PROXY_EXT='$PROXY_EXT' STATS='$STATS'"
|
||||||
str="$str STATS_USER='$STATS_USER' STATS_CRYPT='$STATS_CRYPT'"
|
str="$str STATS_USER='$STATS_USER' STATS_CRYPT='$STATS_CRYPT'"
|
||||||
str="$str U_DISK='$U_DISK' U_BANDWIDTH='0' SUSPENDED='no'"
|
str="$str U_DISK='$U_DISK' U_BANDWIDTH='0' SUSPENDED='no'"
|
||||||
str="$str TIME='$(date +%T)' DATE='$(date +%F)'"
|
str="$str TIME='$(date +%T)' DATE='$(date +%F)'"
|
||||||
|
@ -312,51 +291,51 @@ if [ "$web" != 'no' ]; then
|
||||||
# Rebuild web config
|
# Rebuild web config
|
||||||
rebuild_web_domain_conf
|
rebuild_web_domain_conf
|
||||||
|
|
||||||
# Adding apache virtualhost
|
# Adding vhost
|
||||||
httpd_conf='/etc/httpd/conf.d/vesta.conf'
|
web_conf="/etc/$WEB_SYSTEM/conf.d/vesta.conf"
|
||||||
tmp_conf="$HOMEDIR/$user/conf/web/tmp_httpd.conf"
|
tmp_conf="$HOMEDIR/$user/conf/web/tmp_$WEB_SYSTEM.conf"
|
||||||
conf="$HOMEDIR/$user/conf/web/httpd.conf"
|
conf="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.conf"
|
||||||
cat $tmp_conf >> $conf
|
cat $tmp_conf >> $conf
|
||||||
rm -f $tmp_conf
|
rm -f $tmp_conf
|
||||||
httpd_include=$(grep "$conf" $httpd_conf )
|
web_include=$(grep "$conf" $web_conf)
|
||||||
if [ -z "$httpd_include" ]; then
|
if [ -z "$web_include" ]; then
|
||||||
echo "Include $conf" >> $httpd_conf
|
echo "Include $conf" >> $web_conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Adding ssl apache virtuualhost
|
# Adding SSL vhost
|
||||||
if [ "$ssl_change" = 'yes' ]; then
|
if [ "$ssl_change" = 'yes' ]; then
|
||||||
tmp_conf="$HOMEDIR/$user/conf/web/tmp_shttpd.conf"
|
tmp_conf="$HOMEDIR/$user/conf/web/tmp_s$WEB_SYSTEM.conf"
|
||||||
conf="$HOMEDIR/$user/conf/web/shttpd.conf"
|
conf="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.conf"
|
||||||
cat $tmp_conf >> $conf
|
cat $tmp_conf >> $conf
|
||||||
rm -f $tmp_conf
|
rm -f $tmp_conf
|
||||||
fi
|
fi
|
||||||
httpd_include=$(grep "$conf" $httpd_conf )
|
ssl_include=$(grep "$conf" $web_conf)
|
||||||
if [ -z "$httpd_include" ]; then
|
if [ -z "$ssl_include" ]; then
|
||||||
echo "Include $conf" >> $httpd_conf
|
echo "Include $conf" >> $web_conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Adding nginx virtualhost
|
# Adding proxy vhost
|
||||||
nginx_conf='/etc/nginx/conf.d/vesta_users.conf'
|
proxy_conf="/etc/$PROXY_SYSTEM/conf.d/vesta.conf"
|
||||||
if [ "$ngix_change" = 'yes' ]; then
|
if [ "$proxy_change" = 'yes' ]; then
|
||||||
tmp_conf="$HOMEDIR/$user/conf/web/tmp_nginx.conf"
|
tmp_conf="$HOMEDIR/$user/conf/web/tmp_$PROXY_SYSTEM.conf"
|
||||||
conf="$HOMEDIR/$user/conf/web/nginx.conf"
|
conf="$HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf"
|
||||||
cat $tmp_conf >> $conf
|
cat $tmp_conf >> $conf
|
||||||
rm -f $tmp_conf
|
rm -f $tmp_conf
|
||||||
fi
|
fi
|
||||||
nginx_include=$(grep "$conf" $nginx_conf )
|
proxy_include=$(grep "$conf" $proxy_conf)
|
||||||
if [ -z "$nginx_include" ]; then
|
if [ -z "$proxy_include" ]; then
|
||||||
echo "include $conf;" >> $nginx_conf
|
echo "include $conf;" >> $proxy_conf
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Adding ssl nginx virtualhost
|
# Adding SSL proxy vhost
|
||||||
if [ "$ngix_change" = 'yes' ] && [ "$ssl_change" = 'yes' ]; then
|
if [ "$proxy_change" = 'yes' ] && [ "$ssl_change" = 'yes' ]; then
|
||||||
tmp_conf="$HOMEDIR/$user/conf/web/tmp_snginx.conf"
|
tmp_conf="$HOMEDIR/$user/conf/web/tmp_s$PROXY_SYSTEM.conf"
|
||||||
conf="$HOMEDIR/$user/conf/web/snginx.conf"
|
conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf"
|
||||||
cat $tmp_conf >> $conf
|
cat $tmp_conf >> $conf
|
||||||
rm -f $tmp_conf
|
rm -f $tmp_conf
|
||||||
nginx_include=$(grep "$conf" $nginx_conf )
|
proxy_include=$(grep "$conf" $proxy_conf)
|
||||||
if [ -z "$nginx_include" ]; then
|
if [ -z "$proxy_include" ]; then
|
||||||
echo "include $conf;" >> $nginx_conf
|
echo "include $conf;" >> $proxy_conf
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
@ -380,7 +359,8 @@ if [ "$web" != 'no' ]; then
|
||||||
done
|
done
|
||||||
|
|
||||||
# Restart WEB
|
# Restart WEB
|
||||||
$BIN/v-restart-web "$EVENT"
|
$BIN/v-restart-web
|
||||||
|
$BIN/v-restart-proxy
|
||||||
echo
|
echo
|
||||||
msg="$msg\n"
|
msg="$msg\n"
|
||||||
fi
|
fi
|
||||||
|
|
|
@ -42,8 +42,8 @@ is_object_unsuspended 'web' 'DOMAIN' "$domain"
|
||||||
|
|
||||||
# Parsing domain values
|
# Parsing domain values
|
||||||
get_domain_values 'web'
|
get_domain_values 'web'
|
||||||
tpl_file="$WEBTPL/apache/$TPL.tpl"
|
tpl_file="$WEBTPL/$WEB_SYSTEM/$TPL.tpl"
|
||||||
conf="$HOMEDIR/$user/conf/web/httpd.conf"
|
conf="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.conf"
|
||||||
SUSPENDED='yes'
|
SUSPENDED='yes'
|
||||||
ip=$(get_real_ip $IP)
|
ip=$(get_real_ip $IP)
|
||||||
|
|
||||||
|
@ -54,27 +54,29 @@ upd_web_domain_values
|
||||||
del_web_config
|
del_web_config
|
||||||
add_web_config
|
add_web_config
|
||||||
|
|
||||||
# Check ssl
|
# Check SSL
|
||||||
if [ "$SSL" = 'yes' ]; then
|
if [ "$SSL" = 'yes' ]; then
|
||||||
tpl_file="$WEBTPL/apache/$TPL.stpl"
|
tpl_file="$WEBTPL/$WEB_SYSTEM/$TPL.stpl"
|
||||||
conf="$HOMEDIR/$user/conf/web/shttpd.conf"
|
conf="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.conf"
|
||||||
del_web_config
|
del_web_config
|
||||||
add_web_config
|
add_web_config
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Checking nginx
|
# Checking proxy
|
||||||
if [ ! -z "$NGINX" ]; then
|
if [ ! -z "$PROXY" ]; then
|
||||||
tpl_file="$WEBTPL/nginx/$NGINX.tpl"
|
tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.tpl"
|
||||||
conf="$HOMEDIR/$user/conf/web/nginx.conf"
|
conf="$HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf"
|
||||||
del_web_config
|
del_web_config
|
||||||
add_web_config
|
add_web_config
|
||||||
|
|
||||||
if [ "$SSL" = 'yes' ]; then
|
fi
|
||||||
tpl_file="$WEBTPL/nginx/$NGINX.stpl"
|
|
||||||
conf="$HOMEDIR/$user/conf/web/snginx.conf"
|
# Checking proxy SSL
|
||||||
del_web_config
|
if [ ! -z "$PROXY" ] && [ "$SSL" = 'yes' ]; then
|
||||||
add_web_config
|
tpl_file="$WEBTPL/$PROXY_SSL/$PROXY.stpl"
|
||||||
fi
|
conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf"
|
||||||
|
del_web_config
|
||||||
|
add_web_config
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
@ -88,7 +90,8 @@ increase_user_value "$user" '$SUSPENDED_WEB'
|
||||||
|
|
||||||
# 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-proxy
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Logging
|
# Logging
|
||||||
|
|
|
@ -40,8 +40,8 @@ is_object_suspended 'web' 'DOMAIN' "$domain"
|
||||||
|
|
||||||
# Parsing domain values
|
# Parsing domain values
|
||||||
get_domain_values 'web'
|
get_domain_values 'web'
|
||||||
tpl_file="$WEBTPL/apache/$TPL.tpl"
|
tpl_file="$WEBTPL/$WEB_SYSTEM/$TPL.tpl"
|
||||||
conf="$HOMEDIR/$user/conf/web/httpd.conf"
|
conf="$HOMEDIR/$user/conf/web/$WEB_SYSTEM.conf"
|
||||||
SUSPENDED='no'
|
SUSPENDED='no'
|
||||||
ip=$(get_real_ip $IP)
|
ip=$(get_real_ip $IP)
|
||||||
|
|
||||||
|
@ -52,27 +52,28 @@ upd_web_domain_values
|
||||||
del_web_config
|
del_web_config
|
||||||
add_web_config
|
add_web_config
|
||||||
|
|
||||||
# Check ssl
|
# Check SSL
|
||||||
if [ "$SSL" = 'yes' ]; then
|
if [ "$SSL" = 'yes' ]; then
|
||||||
tpl_file="$WEBTPL/apache/$TPL.stpl"
|
tpl_file="$WEBTPL/$WEB_SYSTEM/$TPL.stpl"
|
||||||
conf="$HOMEDIR/$user/conf/web/shttpd.conf"
|
conf="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.conf"
|
||||||
del_web_config
|
del_web_config
|
||||||
add_web_config
|
add_web_config
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Checking nginx
|
# Checking proxy
|
||||||
if [ ! -z "$NGINX" ]; then
|
if [ ! -z "$PROXY" ]; then
|
||||||
tpl_file="$WEBTPL/nginx/$NGINX.tpl"
|
tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.tpl"
|
||||||
conf="$HOMEDIR/$user/conf/web/nginx.conf"
|
conf="$HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf"
|
||||||
del_web_config
|
del_web_config
|
||||||
add_web_config
|
add_web_config
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "$SSL" = 'yes' ]; then
|
# Checking SSL proxy
|
||||||
tpl_file="$WEBTPL/nginx/$NGINX.stpl"
|
if [ ! -z "$PROXY" ] && [ "$SSL" = 'yes' ]; then
|
||||||
conf="$HOMEDIR/$user/conf/web/snginx.conf"
|
tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.stpl"
|
||||||
del_web_config
|
conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf"
|
||||||
add_web_config
|
del_web_config
|
||||||
fi
|
add_web_config
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
@ -86,7 +87,8 @@ decrease_user_value "$user" '$SUSPENDED_WEB'
|
||||||
|
|
||||||
# Restart web erver
|
# Restart web erver
|
||||||
if [ "$restart" != 'no' ]; then
|
if [ "$restart" != 'no' ]; then
|
||||||
$BIN/v-restart-web "$EVENT"
|
$BIN/v-restart-web
|
||||||
|
$BIN/v-restart-proxy
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Logging
|
# Logging
|
||||||
|
|
|
@ -16,10 +16,8 @@ user=${1-admin}
|
||||||
ip_status=${2-shared}
|
ip_status=${2-shared}
|
||||||
|
|
||||||
# Includes
|
# Includes
|
||||||
source $VESTA/conf/vesta.conf # include for internal func
|
source $VESTA/conf/vesta.conf
|
||||||
source $VESTA/func/main.sh
|
source $VESTA/func/main.sh
|
||||||
source $VESTA/func/ip.sh
|
|
||||||
source $VESTA/func/domain.sh
|
|
||||||
|
|
||||||
|
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
@ -35,40 +33,15 @@ is_object_valid 'user' 'USER' "$user" "$user"
|
||||||
# Action #
|
# Action #
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
|
||||||
# Get ip list
|
|
||||||
ip_list=$(/sbin/ifconfig | grep 'inet addr:' | cut -f 2 -d : | \
|
ip_list=$(/sbin/ifconfig | grep 'inet addr:' | cut -f 2 -d : | \
|
||||||
cut -f 1 -d ' '| grep -v 127.0.0.1)
|
cut -f 1 -d ' '| grep -v 127.0.0.1)
|
||||||
|
|
||||||
# Get vesta registered ip list
|
|
||||||
vesta_ip_list=$(ls $VESTA/data/ips/)
|
|
||||||
|
|
||||||
# Defining config paths
|
|
||||||
conf='/etc/httpd/conf.d/vesta.conf'
|
|
||||||
nconf='/etc/nginx/conf.d/vesta_ip.conf'
|
|
||||||
iconf='/etc/sysconfig/network-scripts/ifcfg'
|
|
||||||
rconf='/etc/httpd/conf.d/mod_extract_forwarded.conf'
|
|
||||||
|
|
||||||
# Comparing each ip
|
|
||||||
for ip in $ip_list; do
|
for ip in $ip_list; do
|
||||||
check_ip=$(echo $vesta_ip_list | grep -w "$ip")
|
if [ ! -e "$VESTA/data/ips/$ip" ]; then
|
||||||
|
iface=$(/sbin/ifconfig |grep -B1 -w $ip |head -n1 |cut -f1 -d ' ')
|
||||||
# Checking ip registered
|
|
||||||
if [ -z "$check_ip" ]; then
|
|
||||||
# Parsing additional params
|
|
||||||
iface=$(/sbin/ifconfig |grep -B1 -w $ip |head -n 1 |cut -f 1 -d ' ')
|
|
||||||
interface=$(echo "$iface" | cut -f 1 -d :)
|
interface=$(echo "$iface" | cut -f 1 -d :)
|
||||||
mask=$(/sbin/ifconfig |grep -w $ip |awk -F "Mask:" '{print $2}')
|
mask=$(/sbin/ifconfig |grep -w $ip |awk -F "Mask:" '{print $2}')
|
||||||
|
$BIN/v-add-sys-ip $ip $mask $interface
|
||||||
# Adding vesta ip
|
|
||||||
create_vesta_ip
|
|
||||||
|
|
||||||
# Adding namehosting support
|
|
||||||
namehost_ip_support
|
|
||||||
|
|
||||||
# Creating startup script
|
|
||||||
if [ ! -e "$iconf-$iface" ]; then
|
|
||||||
create_vesta_ip
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# TBD: revers comparation
|
# TBD: revers comparation
|
||||||
|
@ -79,15 +52,4 @@ done
|
||||||
# Vesta #
|
# Vesta #
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
|
||||||
# Updating user conf
|
|
||||||
increase_user_value "$user" '$IP_OWNED'
|
|
||||||
|
|
||||||
# Restart web server
|
|
||||||
if [ "$web_restart" = 'yes' ]; then
|
|
||||||
$BIN/v-restart-web "$EVENT"
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Logging
|
|
||||||
log_event "$OK" "$EVENT"
|
|
||||||
|
|
||||||
exit
|
exit
|
||||||
|
|
|
@ -102,12 +102,12 @@ for period in $periods; do
|
||||||
$BIN/v-update-sys-rrd-ssh $period
|
$BIN/v-update-sys-rrd-ssh $period
|
||||||
|
|
||||||
# Updating web stats
|
# Updating web stats
|
||||||
if [ "$WEB_SYSTEM" = 'apache' ]; then
|
if [ ! -z "$WEB_SYSTEM" ]; then
|
||||||
$BIN/v-update-sys-rrd-httpd $period
|
$BIN/v-update-sys-rrd-$WEB_SYSTEM $period
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$PROXY_SYSTEM" = 'nginx' ]; then
|
if [ ! -z "$PROXY_SYSTEM" ]; then
|
||||||
$BIN/v-update-sys-rrd-nginx $period
|
$BIN/v-update-sys-rrd-$PROXY_SYSTEM $period
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Updating ftp stats
|
# Updating ftp stats
|
||||||
|
|
|
@ -38,7 +38,7 @@ is_object_unsuspended 'web' 'DOMAIN' "$domain"
|
||||||
#----------------------------------------------------------#
|
#----------------------------------------------------------#
|
||||||
|
|
||||||
# Defining log file
|
# Defining log file
|
||||||
log_file="/var/log/httpd/domains/$domain.bytes"
|
log_file="/var/log/$WEB_SYSTEM/domains/$domain.bytes"
|
||||||
|
|
||||||
# Defining bytes
|
# Defining bytes
|
||||||
bytes=0
|
bytes=0
|
||||||
|
|
|
@ -38,7 +38,7 @@ for domain in $(search_objects 'web' 'SUSPENDED' "no" 'DOMAIN'); do
|
||||||
update_object_value 'web' 'DOMAIN' "$domain" '$U_BANDWIDTH' '0'
|
update_object_value 'web' 'DOMAIN' "$domain" '$U_BANDWIDTH' '0'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
log_file="/var/log/httpd/domains/$domain.bytes"
|
log_file="/var/log/$WEB_SYSTEM/domains/$domain.bytes"
|
||||||
bytes=0
|
bytes=0
|
||||||
|
|
||||||
# Parsing log
|
# Parsing log
|
||||||
|
|
120
func/domain.sh
120
func/domain.sh
|
@ -1,46 +1,32 @@
|
||||||
# Web template check
|
# Web template check
|
||||||
is_apache_template_valid() {
|
is_web_template_valid() {
|
||||||
t="$WEBTPL/apache/$template.tpl"
|
t="$WEBTPL/$WEB_SYSTEM/$template.tpl"
|
||||||
s="$WEBTPL/apache/$template.stpl"
|
s="$WEBTPL/$WEB_SYSTEM/$template.stpl"
|
||||||
if [ ! -e $t ] || [ ! -e $s ]; then
|
if [ ! -e $t ] || [ ! -e $s ]; then
|
||||||
template='default'
|
echo "Error: web template $template not found"
|
||||||
t="$WEBTPL/apache/$template.tpl"
|
log_event "$E_NOTEXIST" "$EVENT"
|
||||||
s="$WEBTPL/apache/$template.stpl"
|
exit $E_NOTEXIST
|
||||||
if [ ! -e $t ] || [ ! -e $s ]; then
|
|
||||||
echo "Error: template $template not found"
|
|
||||||
log_event "$E_NOTEXIST" "$EVENT"
|
|
||||||
exit $E_NOTEXIST
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Nginx template check
|
# Proxy template check
|
||||||
is_nginx_template_valid() {
|
is_proxy_template_valid() {
|
||||||
t="$WEBTPL/nginx/$template.tpl"
|
t="$WEBTPL/$PROXY_SYSTEM/$template.tpl"
|
||||||
s="$WEBTPL/nginx/$template.stpl"
|
s="$WEBTPL/$PROXY_SYSTEM/$template.stpl"
|
||||||
if [ ! -e $t ] || [ ! -e $s ]; then
|
if [ ! -e $t ] || [ ! -e $s ]; then
|
||||||
template='default'
|
echo "Error: proxy template $template not found"
|
||||||
t="$WEBTPL/nginx/$template.tpl"
|
log_event "$E_NOTEXIST" "$EVENT"
|
||||||
s="$WEBTPL/nginx/$template.stpl"
|
exit $E_NOTEXIST
|
||||||
if [ ! -e $t ] || [ ! -e $s ]; then
|
|
||||||
echo "Error: nginx $template not found"
|
|
||||||
log_event "$E_NOTEXIST" "$EVENT"
|
|
||||||
exit $E_NOTEXIST
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# DNS template check
|
# DNS template check
|
||||||
is_dns_template_valid() {
|
is_dns_template_valid() {
|
||||||
tpl="$DNSTPL/$template.tpl"
|
t="$DNSTPL/$template.tpl"
|
||||||
if [ ! -e $tpl ]; then
|
if [ ! -e $t ]; then
|
||||||
template='default'
|
echo "Error: dns template $template not found"
|
||||||
tpl="$DNSTPL/$template.tpl"
|
log_event "$E_NOTEXIST" "$EVENT"
|
||||||
if [ ! -e $tpl ]; then
|
exit $E_NOTEXIST
|
||||||
echo "Error: template not found"
|
|
||||||
log_event "$E_NOTEXIST" "$EVENT"
|
|
||||||
exit $E_NOTEXIST
|
|
||||||
fi
|
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -239,6 +225,7 @@ add_web_config() {
|
||||||
-e "s/%web_ssl_port%/$WEB_SSL_PORT/g" \
|
-e "s/%web_ssl_port%/$WEB_SSL_PORT/g" \
|
||||||
-e "s/%proxy_port%/$PROXY_PORT/g" \
|
-e "s/%proxy_port%/$PROXY_PORT/g" \
|
||||||
-e "s/%proxy_ssl_port%/$PROXY_SSL_PORT/g" \
|
-e "s/%proxy_ssl_port%/$PROXY_SSL_PORT/g" \
|
||||||
|
-e "s/%proxy_extentions%/${PROXY_EXT//,/|}/g" \
|
||||||
-e "s/%domain_idn%/$domain_idn/g" \
|
-e "s/%domain_idn%/$domain_idn/g" \
|
||||||
-e "s/%domain%/$domain/g" \
|
-e "s/%domain%/$domain/g" \
|
||||||
-e "s/%user%/$user/g" \
|
-e "s/%user%/$user/g" \
|
||||||
|
@ -255,10 +242,6 @@ add_web_config() {
|
||||||
-e "s/%ssl_pem%/${ssl_pem////\/}/g" \
|
-e "s/%ssl_pem%/${ssl_pem////\/}/g" \
|
||||||
-e "s/%ssl_ca_str%/${ssl_ca_str////\/}/g" \
|
-e "s/%ssl_ca_str%/${ssl_ca_str////\/}/g" \
|
||||||
-e "s/%ssl_ca%/${ssl_ca////\/}/g" \
|
-e "s/%ssl_ca%/${ssl_ca////\/}/g" \
|
||||||
-e "s/%nginx_extentions%/${NGINX_EXT//,/|}/g" \
|
|
||||||
-e "s/%elog%//g" \
|
|
||||||
-e "s/%cgi%//g" \
|
|
||||||
-e "s/%cgi_option%/+ExecCGI/g" \
|
|
||||||
>> $conf
|
>> $conf
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -397,71 +380,6 @@ del_web_config() {
|
||||||
sed -i "$top_line,$bottom_line d" $conf
|
sed -i "$top_line,$bottom_line d" $conf
|
||||||
}
|
}
|
||||||
|
|
||||||
# Add ip virtual hosting support
|
|
||||||
namehost_ip_support() {
|
|
||||||
if [ "$WEB_SYSTEM" = 'apache' ]; then
|
|
||||||
conf_line=$(grep -n "NameVirtual" $conf|tail -n 1|cut -f 1 -d ':')
|
|
||||||
if [ ! -z "$conf_line" ]; then
|
|
||||||
conf_ins=$((conf_line + 1))
|
|
||||||
else
|
|
||||||
conf_ins='1'
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ "$WEB_SSL" = 'mod_ssl' ]; then
|
|
||||||
sed -i "$conf_ins i NameVirtualHost $ip:$WEB_SSL_PORT" $conf
|
|
||||||
sed -i "$conf_ins i Listen $ip:$WEB_SSL_PORT" $conf
|
|
||||||
fi
|
|
||||||
|
|
||||||
sed -i "$conf_ins i NameVirtualHost $ip:$WEB_PORT" $conf
|
|
||||||
sed -i "$conf_ins i Listen $ip:$WEB_PORT" $conf
|
|
||||||
|
|
||||||
if [ "$PROXY_SYSTEM" = 'nginx' ]; then
|
|
||||||
cat $WEBTPL/nginx/ip.tpl | sed -e "s/%ip%/$ip/g" \
|
|
||||||
-e "s/%web_port%/$WEB_PORT/g" \
|
|
||||||
-e "s/%proxy_port%/$PROXY_PORT/g" >>$nconf
|
|
||||||
|
|
||||||
ips=$(grep 'MEFaccept ' $rconf |grep -v '#'| head -n1)
|
|
||||||
sed -i "s/$ips/$ips $ip/g" $rconf
|
|
||||||
fi
|
|
||||||
web_restart='yes'
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Disable virtual ip hosting support
|
|
||||||
namehost_ip_disable() {
|
|
||||||
if [ "$WEB_SYSTEM" = 'apache' ]; then
|
|
||||||
sed -i "/NameVirtualHost $ip:/d" $conf
|
|
||||||
sed -i "/Listen $ip:/d" $conf
|
|
||||||
|
|
||||||
if [ "$PROXY_SYSTEM" = 'nginx' ]; then
|
|
||||||
tpl_ln=$(wc -l $WEBTPL/nginx/ip.tpl | cut -f 1 -d ' ')
|
|
||||||
ip_line=$(grep -n "%ip%" $WEBTPL/nginx/ip.tpl |head -n1 |\
|
|
||||||
cut -f 1 -d :)
|
|
||||||
conf_line=$(grep -n -w $ip $nconf|head -n1|cut -f 1 -d :)
|
|
||||||
if [ -z "$tpl_ln" ] || [ -z "$ip_line" ] || [ -z "$conf_line" ]
|
|
||||||
then
|
|
||||||
echo "Error: nginx config paring error"
|
|
||||||
log_event "$E_PARSING" "$EVENT"
|
|
||||||
exit $E_PARSING
|
|
||||||
fi
|
|
||||||
up_line=$((ip_line - 1))
|
|
||||||
first_line=$((conf_line - up_line))
|
|
||||||
last_line=$((conf_line - ip_line + tpl_ln))
|
|
||||||
|
|
||||||
if [ -z "$first_line" ] || [ -z "$last_line" ]; then
|
|
||||||
echo "Error: nginx config paring error"
|
|
||||||
log_event "$E_PARSING" "$EVENT"
|
|
||||||
exit $E_PARSING
|
|
||||||
fi
|
|
||||||
sed -i "$first_line,$last_line d" $nconf
|
|
||||||
ips=$(grep 'RPAFproxy_ips' $rconf)
|
|
||||||
new_ips=$(echo "$ips"|sed -e "s/$ip//")
|
|
||||||
sed -i "s/$ips/$new_ips/g" $rconf
|
|
||||||
fi
|
|
||||||
web_restart='yes'
|
|
||||||
fi
|
|
||||||
}
|
|
||||||
|
|
||||||
# Update web domain values
|
# Update web domain values
|
||||||
upd_web_domain_values() {
|
upd_web_domain_values() {
|
||||||
group="$user"
|
group="$user"
|
||||||
|
|
28
func/ip.sh
28
func/ip.sh
|
@ -45,9 +45,7 @@ is_ip_owner() {
|
||||||
|
|
||||||
# Check if ip address is free
|
# Check if ip address is free
|
||||||
is_ip_free() {
|
is_ip_free() {
|
||||||
list=$(/sbin/ifconfig |grep 'inet addr:' |cut -f 2 -d : |cut -f 1 -d ' ')
|
if [ -e "$VESTA/data/ips/$ip" ]; then
|
||||||
ip_check=$(echo "$list" |grep -w "$ip")
|
|
||||||
if [ -n "$ip_check" ] || [ -e "$VESTA/data/ips/$ip" ]; then
|
|
||||||
echo "Error: IP exist"
|
echo "Error: IP exist"
|
||||||
log_event "$E_EXISTS" "$EVENT"
|
log_event "$E_EXISTS" "$EVENT"
|
||||||
exit $E_EXISTS
|
exit $E_EXISTS
|
||||||
|
@ -174,30 +172,6 @@ get_ip_value() {
|
||||||
echo "$value"
|
echo "$value"
|
||||||
}
|
}
|
||||||
|
|
||||||
# Create ip vesta configuration
|
|
||||||
create_vesta_ip() {
|
|
||||||
ip_data="OWNER='$user'"
|
|
||||||
ip_data="$ip_data\nSTATUS='$ip_status'"
|
|
||||||
ip_data="$ip_data\nNAME='$ip_name'"
|
|
||||||
ip_data="$ip_data\nU_SYS_USERS=''"
|
|
||||||
ip_data="$ip_data\nU_WEB_DOMAINS='0'"
|
|
||||||
ip_data="$ip_data\nINTERFACE='$interface'"
|
|
||||||
ip_data="$ip_data\nNETMASK='$mask'"
|
|
||||||
ip_data="$ip_data\nNAT='$nat_ip'"
|
|
||||||
ip_data="$ip_data\nTIME='$TIME'"
|
|
||||||
ip_data="$ip_data\nDATE='$DATE'"
|
|
||||||
echo -e "$ip_data" >$VESTA/data/ips/$ip
|
|
||||||
chmod 660 $VESTA/data/ips/$ip
|
|
||||||
}
|
|
||||||
|
|
||||||
# Create ip address startup configuration
|
|
||||||
create_ip_startup() {
|
|
||||||
ip_data="# Added by vesta $SCRIPT\nDEVICE=$iface"
|
|
||||||
ip_data="$ip_data\nBOOTPROTO=static\nONBOOT=yes\nIPADDR=$ip"
|
|
||||||
ip_data="$ip_data\nNETMASK=$mask"
|
|
||||||
echo -e "$ip_data" > $iconf-$iface
|
|
||||||
}
|
|
||||||
|
|
||||||
# Get real ip address
|
# Get real ip address
|
||||||
get_real_ip() {
|
get_real_ip() {
|
||||||
if [ -e "$VESTA/data/ips/$1" ]; then
|
if [ -e "$VESTA/data/ips/$1" ]; then
|
||||||
|
|
|
@ -209,7 +209,7 @@ is_object_valid() {
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
if [ -z "$sobject" ]; then
|
if [ -z "$sobject" ]; then
|
||||||
echo "Error: $3 not exist"
|
echo "Error: $2 $3 not exist"
|
||||||
log_event "$E_NOTEXIST" "$EVENT"
|
log_event "$E_NOTEXIST" "$EVENT"
|
||||||
exit $E_NOTEXIST
|
exit $E_NOTEXIST
|
||||||
fi
|
fi
|
||||||
|
@ -684,7 +684,7 @@ validate_format_mhdmw() {
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
# Nginx static extention or DNS record
|
# proxy extention or DNS record
|
||||||
validate_format_common() {
|
validate_format_common() {
|
||||||
exclude="[!|#|$|^|&|(|)|+|=|{|}|:|<|>|?|/|\|\"|'|;|%|\`| ]"
|
exclude="[!|#|$|^|&|(|)|+|=|{|}|:|<|>|?|/|\|\"|'|;|%|\`| ]"
|
||||||
if [[ "$1" =~ $exclude ]] || [ 200 -le ${#1} ]; then
|
if [[ "$1" =~ $exclude ]] || [ 200 -le ${#1} ]; then
|
||||||
|
|
|
@ -156,14 +156,14 @@ rebuild_web_domain_conf() {
|
||||||
$HOMEDIR/$user/web/$domain/logs
|
$HOMEDIR/$user/web/$domain/logs
|
||||||
|
|
||||||
# Create domain logs
|
# Create domain logs
|
||||||
touch /var/log/httpd/domains/$domain.bytes \
|
touch /var/log/$WEB_SYSTEM/domains/$domain.bytes \
|
||||||
/var/log/httpd/domains/$domain.log \
|
/var/log/$WEB_SYSTEM/domains/$domain.log \
|
||||||
/var/log/httpd/domains/$domain.error.log
|
/var/log/$WEB_SYSTEM/domains/$domain.error.log
|
||||||
|
|
||||||
# Create symlinks
|
# Create symlinks
|
||||||
cd $HOMEDIR/$user/web/$domain/logs/
|
cd $HOMEDIR/$user/web/$domain/logs/
|
||||||
ln -f -s /var/log/httpd/domains/$domain.log .
|
ln -f -s /var/log/$WEB_SYSTEM/domains/$domain.log .
|
||||||
ln -f -s /var/log/httpd/domains/$domain.error.log .
|
ln -f -s /var/log/$WEB_SYSTEM/domains/$domain.error.log .
|
||||||
cd - > /dev/null
|
cd - > /dev/null
|
||||||
|
|
||||||
# Propagate html skeleton
|
# Propagate html skeleton
|
||||||
|
@ -180,7 +180,7 @@ rebuild_web_domain_conf() {
|
||||||
chmod 751 $HOMEDIR/$user/web/$domain/document_errors
|
chmod 751 $HOMEDIR/$user/web/$domain/document_errors
|
||||||
chmod 551 $HOMEDIR/$user/web/$domain/stats
|
chmod 551 $HOMEDIR/$user/web/$domain/stats
|
||||||
chmod 551 $HOMEDIR/$user/web/$domain/logs
|
chmod 551 $HOMEDIR/$user/web/$domain/logs
|
||||||
chmod 640 /var/log/httpd/domains/$domain.*
|
chmod 640 /var/log/$WEB_SYSTEM/domains/$domain.*
|
||||||
|
|
||||||
# Set ownership
|
# Set ownership
|
||||||
chown $user:$user $HOMEDIR/$user/web/$domain
|
chown $user:$user $HOMEDIR/$user/web/$domain
|
||||||
|
@ -189,19 +189,18 @@ rebuild_web_domain_conf() {
|
||||||
chown $user:$user $HOMEDIR/$user/web/$domain/public_html
|
chown $user:$user $HOMEDIR/$user/web/$domain/public_html
|
||||||
chown $user:$user $HOMEDIR/$user/web/$domain/public_shtml
|
chown $user:$user $HOMEDIR/$user/web/$domain/public_shtml
|
||||||
chown -R $user:$user $HOMEDIR/$user/web/$domain/document_errors
|
chown -R $user:$user $HOMEDIR/$user/web/$domain/document_errors
|
||||||
chown root:$user /var/log/httpd/domains/$domain.*
|
chown root:$user /var/log/$WEB_SYSTEM/domains/$domain.*
|
||||||
|
|
||||||
|
# Adding tmp conf
|
||||||
# Adding tmp_httpd.conf
|
tpl_file="$WEBTPL/$WEB_SYSTEM/$TPL.tpl"
|
||||||
tpl_file="$WEBTPL/apache/$TPL.tpl"
|
conf="$HOMEDIR/$user/conf/web/tmp_$WEB_SYSTEM.conf"
|
||||||
conf="$HOMEDIR/$user/conf/web/tmp_httpd.conf"
|
|
||||||
add_web_config
|
add_web_config
|
||||||
chown root:apache $conf
|
chown root:$user $conf
|
||||||
chmod 640 $conf
|
chmod 640 $conf
|
||||||
|
|
||||||
# Running template trigger
|
# Running template trigger
|
||||||
if [ -x $WEBTPL/apache/$TPL.sh ]; then
|
if [ -x $WEBTPL/$WEB_SYSTEM/$TPL.sh ]; then
|
||||||
$WEBTPL/apache/$TPL.sh $user $domain $ip $HOMEDIR $docroot
|
$WEBTPL/$WEB_SYSTEM/$TPL.sh $user $domain $ip $HOMEDIR $docroot
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Checking aliases
|
# Checking aliases
|
||||||
|
@ -253,13 +252,13 @@ rebuild_web_domain_conf() {
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Checking ssl
|
# Checking SSL
|
||||||
if [ "$SSL" = 'yes' ]; then
|
if [ "$SSL" = 'yes' ]; then
|
||||||
# Adding domain to the shttpd.conf
|
# Adding domain to the web conf
|
||||||
conf="$HOMEDIR/$user/conf/web/tmp_shttpd.conf"
|
conf="$HOMEDIR/$user/conf/web/tmp_s$WEB_SYSTEM.conf"
|
||||||
tpl_file="$WEBTPL/apache/$TPL.stpl"
|
tpl_file="$WEBTPL/$WEB_SYSTEM/$TPL.stpl"
|
||||||
add_web_config
|
add_web_config
|
||||||
chown root:apache $conf
|
chown root:$user $conf
|
||||||
chmod 640 $conf
|
chmod 640 $conf
|
||||||
|
|
||||||
cp -f $USER_DATA/ssl/$domain.crt \
|
cp -f $USER_DATA/ssl/$domain.crt \
|
||||||
|
@ -274,30 +273,30 @@ rebuild_web_domain_conf() {
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Running template trigger
|
# Running template trigger
|
||||||
if [ -x $WEBTPL/apache/$TPL.sh ]; then
|
if [ -x $WEBTPL/$WEB_SYSTEM/$TPL.sh ]; then
|
||||||
$WEBTPL/apache/$TPL.sh $user $domain $ip $HOMEDIR $sdocroot
|
$WEBTPL/$WEB_SYSTEM/$TPL.sh $user $domain $ip $HOMEDIR $sdocroot
|
||||||
fi
|
fi
|
||||||
|
|
||||||
user_ssl=$((user_ssl + 1))
|
user_ssl=$((user_ssl + 1))
|
||||||
ssl_change='yes'
|
ssl_change='yes'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Checking nginx
|
# Checking proxy
|
||||||
if [ ! -z "$NGINX" ]; then
|
if [ ! -z "$PROXY" ]; then
|
||||||
tpl_file="$WEBTPL/nginx/$NGINX.tpl"
|
tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.tpl"
|
||||||
conf="$HOMEDIR/$user/conf/web/tmp_nginx.conf"
|
conf="$HOMEDIR/$user/conf/web/tmp_$PROXY_SYSTEM.conf"
|
||||||
add_web_config
|
add_web_config
|
||||||
chown root:nginx $conf
|
chown root:$user $conf
|
||||||
chmod 640 $conf
|
chmod 640 $conf
|
||||||
|
|
||||||
if [ "$SSL" = 'yes' ]; then
|
if [ "$SSL" = 'yes' ]; then
|
||||||
tpl_file="$WEBTPL/nginx/$NGINX.stpl"
|
tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.stpl"
|
||||||
conf="$HOMEDIR/$user/conf/web/tmp_snginx.conf"
|
conf="$HOMEDIR/$user/conf/web/tmp_s$PROXY_SYSTEM.conf"
|
||||||
add_web_config
|
add_web_config
|
||||||
chown root:nginx $conf
|
chown root:$user $conf
|
||||||
chmod 640 $conf
|
chmod 640 $conf
|
||||||
fi
|
fi
|
||||||
ngix_change='yes'
|
proxy_change='yes'
|
||||||
fi
|
fi
|
||||||
if [ "$SUSPENDED" = 'yes' ]; then
|
if [ "$SUSPENDED" = 'yes' ]; then
|
||||||
suspended_web=$((suspended_web + 1))
|
suspended_web=$((suspended_web + 1))
|
||||||
|
|
|
@ -1,29 +1,71 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Define data path
|
# Rename web system service
|
||||||
TPL='/usr/local/vesta/data/templates/web'
|
sed -i "s/apache/httpd/g" /usr/local/vesta/conf/vesta.conf
|
||||||
|
|
||||||
# Check for new template structure
|
# Rename dns system service
|
||||||
|
sed -i "s/bind/named/g" /usr/local/vesta/conf/vesta.conf
|
||||||
|
|
||||||
|
# Rename nginx config
|
||||||
|
mv /etc/nginx/conf.d/vesta_users.conf /etc/nginx/conf.d/vesta.conf 2>/dev/null
|
||||||
|
rm -f /etc/nginx/conf.d/vesta_ip.conf 2>/dev/null
|
||||||
|
|
||||||
|
# Update user packages
|
||||||
|
PKG=/usr/local/vesta/data/packages
|
||||||
|
for package in $(ls $PKG); do
|
||||||
|
default=$(grep "^TEMPLATE='" $PKG/$package | cut -f2 -d \')
|
||||||
|
if [ ! -z "$default" ]; then
|
||||||
|
tpl="WEB_TEMPLATE='$default'"
|
||||||
|
tpl="$tpl\nPROXY_TEMPLATE='default'"
|
||||||
|
tpl="$tpl\nDNS_TEMPLATE='default'"
|
||||||
|
sed -i "s/^TEMPLATE=.*/$tpl/g" $PKG/$package
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Update users
|
||||||
|
USR=/usr/local/vesta/data/users
|
||||||
|
for user in $(ls $USR); do
|
||||||
|
default=$(grep "^TEMPLATE='" $USR/$user/user.conf | cut -f2 -d \')
|
||||||
|
if [ ! -z "$default" ]; then
|
||||||
|
tpl="WEB_TEMPLATE='$default'"
|
||||||
|
tpl="$tpl\nPROXY_TEMPLATE='default'"
|
||||||
|
tpl="$tpl\nDNS_TEMPLATE='default'"
|
||||||
|
sed -i "s/^TEMPLATE=.*/$tpl/g" $USR/$user/user.conf
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Rename NGINX to PROXY key
|
||||||
|
sed -i "s/NGINX/PROXY/g" /usr/local/vesta/data/users/*/web.conf
|
||||||
|
|
||||||
|
# Check template structure
|
||||||
|
TPL='/usr/local/vesta/data/templates/web'
|
||||||
if [ -e "$TPL/apache" ]; then
|
if [ -e "$TPL/apache" ]; then
|
||||||
exit
|
mv $TPL/apache $TPL/httpd
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Remove unused email template
|
# Remove unused email template
|
||||||
rm -f $TPL/email_reset_password.tpl
|
if [ -e $TPL/email_reset_password.tpl ]; then
|
||||||
|
rm -f $TPL/email_reset_password.tpl
|
||||||
# Apache
|
|
||||||
mkdir -p $TPL/apache
|
|
||||||
if [ ! -z "$(ls $TPL/| grep apache_)" ];then
|
|
||||||
mv $TPL/apache_* $TPL/apache/
|
|
||||||
for template in $(ls $TPL/apache/); do
|
|
||||||
new_name=$(echo $template |sed -e "s/apache_//")
|
|
||||||
mv -f $TPL/apache/$template $TPL/apache/$new_name
|
|
||||||
done
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Nginx
|
# Update httpd templates
|
||||||
mkdir -p $TPL/nginx
|
if [ ! -z "$(ls $TPL | grep apache_)" ]; then
|
||||||
|
mkdir -p $TPL/httpd
|
||||||
|
mv $TPL/apache_* $TPL/httpd/
|
||||||
|
for template in $(ls $TPL/httpd); do
|
||||||
|
new_name=$(echo $template | sed -e "s/apache_//")
|
||||||
|
mv -f $TPL/httpd/$template $TPL/httpd/$new_name
|
||||||
|
done
|
||||||
|
fi
|
||||||
|
if [ -e "$TPL/httpd" ]; then
|
||||||
|
sed -i -e "s/%elog%//g" \
|
||||||
|
-e "s/%cgi%//g" \
|
||||||
|
-e "s/%cgi_option%/+ExecCGI/g" $TPL/httpd/*
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Update nginx templates
|
||||||
if [ ! -z "$(ls $TPL/| grep nginx_)" ];then
|
if [ ! -z "$(ls $TPL/| grep nginx_)" ];then
|
||||||
|
mkdir -p $TPL/nginx
|
||||||
mv $TPL/nginx_* $TPL/nginx/
|
mv $TPL/nginx_* $TPL/nginx/
|
||||||
for template in $(ls $TPL/nginx/); do
|
for template in $(ls $TPL/nginx/); do
|
||||||
new_name=$(echo $template |sed -e "s/nginx_//")
|
new_name=$(echo $template |sed -e "s/nginx_//")
|
||||||
|
@ -31,21 +73,38 @@ if [ ! -z "$(ls $TPL/| grep nginx_)" ];then
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
if [ -e "$TPL/ngingx.ip.tpl" ]; then
|
if [ -e "$TPL/ngingx.ip.tpl" ]; then
|
||||||
mv $TPL/ngingx.ip.tpl $TPL/nginx/ip.tpl
|
mv $TPL/ngingx.ip.tpl $TPL/nginx/proxy_ip.tpl
|
||||||
|
fi
|
||||||
|
if [ -e "$TPL/nginx/ip.tpl" ]; then
|
||||||
|
mv $TPL/nginx/ip.tpl $TPL/nginx/proxy_ip.tpl
|
||||||
|
fi
|
||||||
|
if [ -e "$TPL/nginx" ]; then
|
||||||
|
sed -i -e "s/%elog%//g" \
|
||||||
|
-e "s/nginx_extentions/proxy_extentions/g" $TPL/nginx/*
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Awstats
|
# Move Awstats templates
|
||||||
mkdir -p $TPL/awstats
|
|
||||||
if [ -e "$TPL/awstats.tpl" ]; then
|
if [ -e "$TPL/awstats.tpl" ]; then
|
||||||
|
mkdir -p $TPL/awstats
|
||||||
mv $TPL/awstats.tpl $TPL/awstats
|
mv $TPL/awstats.tpl $TPL/awstats
|
||||||
mv $TPL/awstats_index.tpl $TPL/awstats/index.tpl
|
mv $TPL/awstats_index.tpl $TPL/awstats/index.tpl
|
||||||
mv $TPL/awstats_nav.tpl $TPL/awstats/nav.tpl
|
mv $TPL/awstats_nav.tpl $TPL/awstats/nav.tpl
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Webalizer
|
# Move Webalizer templates
|
||||||
mkdir -p $TPL/webalizer
|
|
||||||
if [ -e "$TPL/webalizer.tpl" ]; then
|
if [ -e "$TPL/webalizer.tpl" ]; then
|
||||||
|
mkdir -p $TPL/webalizer
|
||||||
mv $TPL/webalizer.tpl $TPL/webalizer
|
mv $TPL/webalizer.tpl $TPL/webalizer
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Update proxy ip configuration
|
||||||
|
for ip in $(ls /usr/local/vesta/data/ips); do
|
||||||
|
cat $TPL/nginx/proxy_ip.tpl |\
|
||||||
|
sed -e "s/%ip%/$ip/g" \
|
||||||
|
-e "s/%web_port%/8080/g" \
|
||||||
|
-e "s/%proxy_port%/80/g" \
|
||||||
|
> /etc/nginx/conf.d/$ip.conf
|
||||||
|
done
|
||||||
|
|
||||||
|
|
||||||
exit
|
exit
|
||||||
|
|
|
@ -21,11 +21,6 @@ if (!empty($_POST['ok'])) {
|
||||||
$v_domain = preg_replace("/^www./i", "", $_POST['v_domain']);
|
$v_domain = preg_replace("/^www./i", "", $_POST['v_domain']);
|
||||||
$v_domain = escapeshellarg($v_domain);
|
$v_domain = escapeshellarg($v_domain);
|
||||||
$v_ip = escapeshellarg($_POST['v_ip']);
|
$v_ip = escapeshellarg($_POST['v_ip']);
|
||||||
if ($_SESSION['user'] == 'admin') {
|
|
||||||
$v_template = escapeshellarg($_POST['v_template']);
|
|
||||||
} else {
|
|
||||||
$v_template = "''";
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!empty($_POST['v_ns1'])) $v_ns1 = escapeshellarg($_POST['v_ns1']);
|
if (!empty($_POST['v_ns1'])) $v_ns1 = escapeshellarg($_POST['v_ns1']);
|
||||||
if (!empty($_POST['v_ns2'])) $v_ns2 = escapeshellarg($_POST['v_ns2']);
|
if (!empty($_POST['v_ns2'])) $v_ns2 = escapeshellarg($_POST['v_ns2']);
|
||||||
|
@ -44,7 +39,7 @@ if (!empty($_POST['ok'])) {
|
||||||
$_SESSION['error_msg'] = __('Field "%s" can not be blank.',$error_msg);
|
$_SESSION['error_msg'] = __('Field "%s" can not be blank.',$error_msg);
|
||||||
} else {
|
} else {
|
||||||
// Add DNS
|
// Add DNS
|
||||||
exec (VESTA_CMD."v-add-dns-domain ".$user." ".$v_domain." ".$v_ip." ".$v_template." ".$v_ns1." ".$v_ns2." ".$v_ns3." ".$ns4, $output, $return_var);
|
exec (VESTA_CMD."v-add-dns-domain ".$user." ".$v_domain." ".$v_ip." ".$v_ns1." ".$v_ns2." ".$v_ns3." ".$ns4, $output, $return_var);
|
||||||
if ($return_var != 0) {
|
if ($return_var != 0) {
|
||||||
$error = implode('<br>', $output);
|
$error = implode('<br>', $output);
|
||||||
if (empty($error)) $error = __('Error code:',$return_var);
|
if (empty($error)) $error = __('Error code:',$return_var);
|
||||||
|
@ -128,15 +123,7 @@ if (!empty($_POST['ok_rec'])) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
if ((empty($_GET['domain'])) && (empty($_POST['domain']))) {
|
if ((empty($_GET['domain'])) && (empty($_POST['domain']))) {
|
||||||
exec (VESTA_CMD."v-get-user-value ".$user." 'TEMPLATE'", $output, $return_var);
|
|
||||||
$template = $output[0] ;
|
|
||||||
unset($output);
|
|
||||||
exec (VESTA_CMD."v-list-dns-templates json", $output, $return_var);
|
|
||||||
$templates = json_decode(implode('', $output), true);
|
|
||||||
unset($output);
|
|
||||||
|
|
||||||
if ((empty($v_ns1)) && (empty($v_ns2))) {
|
if ((empty($v_ns1)) && (empty($v_ns2))) {
|
||||||
exec (VESTA_CMD."v-list-user-ns ".$user." json", $output, $return_var);
|
exec (VESTA_CMD."v-list-user-ns ".$user." json", $output, $return_var);
|
||||||
$nameservers = json_decode(implode('', $output), true);
|
$nameservers = json_decode(implode('', $output), true);
|
||||||
|
|
|
@ -21,7 +21,9 @@ if ($_SESSION['user'] == 'admin') {
|
||||||
if (!empty($_POST['ok'])) {
|
if (!empty($_POST['ok'])) {
|
||||||
// Check input
|
// Check input
|
||||||
if (empty($_POST['v_package'])) $errors[] = __('package');
|
if (empty($_POST['v_package'])) $errors[] = __('package');
|
||||||
if (empty($_POST['v_template'])) $errors[] = __('template');
|
if (empty($_POST['v_web_template'])) $errors[] = __('web template');
|
||||||
|
if (empty($_POST['v_proxy_template'])) $errors[] = __('proxy template');
|
||||||
|
if (empty($_POST['v_dns_template'])) $errors[] = __('dns template');
|
||||||
if (empty($_POST['v_shell'])) $errrors[] = __('shell');
|
if (empty($_POST['v_shell'])) $errrors[] = __('shell');
|
||||||
if (!isset($_POST['v_web_domains'])) $errors[] = __('web domains');
|
if (!isset($_POST['v_web_domains'])) $errors[] = __('web domains');
|
||||||
if (!isset($_POST['v_web_aliases'])) $errors[] = __('web aliases');
|
if (!isset($_POST['v_web_aliases'])) $errors[] = __('web aliases');
|
||||||
|
@ -40,7 +42,9 @@ if ($_SESSION['user'] == 'admin') {
|
||||||
|
|
||||||
// Protect input
|
// Protect input
|
||||||
$v_package = escapeshellarg($_POST['v_package']);
|
$v_package = escapeshellarg($_POST['v_package']);
|
||||||
$v_template = escapeshellarg($_POST['v_template']);
|
$v_web_template = escapeshellarg($_POST['v_web_template']);
|
||||||
|
$v_proxy_template = escapeshellarg($_POST['v_proxy_template']);
|
||||||
|
$v_dns_template = escapeshellarg($_POST['v_dns_template']);
|
||||||
$v_shell = escapeshellarg($_POST['v_shell']);
|
$v_shell = escapeshellarg($_POST['v_shell']);
|
||||||
$v_web_domains = escapeshellarg($_POST['v_web_domains']);
|
$v_web_domains = escapeshellarg($_POST['v_web_domains']);
|
||||||
$v_web_aliases = escapeshellarg($_POST['v_web_aliases']);
|
$v_web_aliases = escapeshellarg($_POST['v_web_aliases']);
|
||||||
|
@ -80,7 +84,9 @@ if ($_SESSION['user'] == 'admin') {
|
||||||
unset($output);
|
unset($output);
|
||||||
|
|
||||||
// Create package
|
// Create package
|
||||||
$pkg = "TEMPLATE=".$v_template."\n";
|
$pkg = "WEB_TEMPLATE=".$v_web_template."\n";
|
||||||
|
$pkg .= "PROXY_TEMPLATE=".$v_proxy_template."\n";
|
||||||
|
$pkg .= "DNS_TEMPLATE=".$v_dns_template."\n";
|
||||||
$pkg .= "WEB_DOMAINS=".$v_web_domains."\n";
|
$pkg .= "WEB_DOMAINS=".$v_web_domains."\n";
|
||||||
$pkg .= "WEB_ALIASES=".$v_web_aliases."\n";
|
$pkg .= "WEB_ALIASES=".$v_web_aliases."\n";
|
||||||
$pkg .= "DNS_DOMAINS=".$v_dns_domains."\n";
|
$pkg .= "DNS_DOMAINS=".$v_dns_domains."\n";
|
||||||
|
@ -129,7 +135,17 @@ if ($_SESSION['user'] == 'admin') {
|
||||||
|
|
||||||
exec (VESTA_CMD."v-list-web-templates json", $output, $return_var);
|
exec (VESTA_CMD."v-list-web-templates json", $output, $return_var);
|
||||||
check_error($return_var);
|
check_error($return_var);
|
||||||
$templates = json_decode(implode('', $output), true);
|
$web_templates = json_decode(implode('', $output), true);
|
||||||
|
unset($output);
|
||||||
|
|
||||||
|
exec (VESTA_CMD."v-list-web-templates-proxy json", $output, $return_var);
|
||||||
|
check_error($return_var);
|
||||||
|
$proxy_templates = json_decode(implode('', $output), true);
|
||||||
|
unset($output);
|
||||||
|
|
||||||
|
exec (VESTA_CMD."v-list-dns-templates json", $output, $return_var);
|
||||||
|
check_error($return_var);
|
||||||
|
$dns_templates = json_decode(implode('', $output), true);
|
||||||
unset($output);
|
unset($output);
|
||||||
|
|
||||||
exec (VESTA_CMD."v-list-sys-shells json", $output, $return_var);
|
exec (VESTA_CMD."v-list-sys-shells json", $output, $return_var);
|
||||||
|
@ -138,7 +154,9 @@ if ($_SESSION['user'] == 'admin') {
|
||||||
unset($output);
|
unset($output);
|
||||||
|
|
||||||
// Set default values
|
// Set default values
|
||||||
if (empty($v_template)) $v_template = 'default';
|
if (empty($v_web_template)) $v_web_template = 'default';
|
||||||
|
if (empty($v_proxy_template)) $v_proxy_template = 'default';
|
||||||
|
if (empty($v_dns_template)) $v_dns_template = 'default';
|
||||||
if (empty($v_shell)) $v_shell = 'nologin';
|
if (empty($v_shell)) $v_shell = 'nologin';
|
||||||
if (empty($v_web_domains)) $v_web_domains = "'0'";
|
if (empty($v_web_domains)) $v_web_domains = "'0'";
|
||||||
if (empty($v_web_aliases)) $v_web_aliases = "'0'";
|
if (empty($v_web_aliases)) $v_web_aliases = "'0'";
|
||||||
|
|
|
@ -25,26 +25,21 @@ $v_ftp_email = $panel[$user]['CONTACT'];
|
||||||
if ((!empty($_POST['v_ssl'])) || (!empty($_POST['v_elog']))) $v_adv = 'yes';
|
if ((!empty($_POST['v_ssl'])) || (!empty($_POST['v_elog']))) $v_adv = 'yes';
|
||||||
if ((!empty($_POST['v_ssl_crt'])) || (!empty($_POST['v_ssl_key']))) $v_adv = 'yes';
|
if ((!empty($_POST['v_ssl_crt'])) || (!empty($_POST['v_ssl_key']))) $v_adv = 'yes';
|
||||||
if ((!empty($_POST['v_ssl_ca'])) || ($_POST['v_stats'] != 'none')) $v_adv = 'yes';
|
if ((!empty($_POST['v_ssl_ca'])) || ($_POST['v_stats'] != 'none')) $v_adv = 'yes';
|
||||||
if (empty($_POST['v_nginx'])) $v_adv = 'yes';
|
if (empty($_POST['v_proxy'])) $v_adv = 'yes';
|
||||||
if (!empty($_POST['v_ftp'])) $v_adv = 'yes';
|
if (!empty($_POST['v_ftp'])) $v_adv = 'yes';
|
||||||
|
|
||||||
$v_nginx_ext = 'jpg, jpeg, gif, png, ico, svg, css, zip, tgz, gz, rar, bz2, exe, pdf, ';
|
$v_proxy_ext = 'jpg, jpeg, gif, png, ico, svg, css, zip, tgz, gz, rar, bz2, exe, pdf, ';
|
||||||
$v_nginx_ext .= 'doc, xls, ppt, txt, odt, ods, odp, odf, tar, bmp, rtf, js, mp3, avi, ';
|
$v_proxy_ext .= 'doc, xls, ppt, txt, odt, ods, odp, odf, tar, bmp, rtf, js, mp3, avi, ';
|
||||||
$v_nginx_ext .= 'mpeg, flv, html, htm';
|
$v_proxy_ext .= 'mpeg, flv, html, htm';
|
||||||
if ($_POST['v_nginx_ext'] != $v_nginx_ext) $v_adv = 'yes';
|
if ($_POST['v_proxy_ext'] != $v_proxy_ext) $v_adv = 'yes';
|
||||||
|
|
||||||
// Protect input
|
// Protect input
|
||||||
$v_domain = preg_replace("/^www./i", "", $_POST['v_domain']);
|
$v_domain = preg_replace("/^www./i", "", $_POST['v_domain']);
|
||||||
$v_domain = escapeshellarg($v_domain);
|
$v_domain = escapeshellarg($v_domain);
|
||||||
$v_ip = escapeshellarg($_POST['v_ip']);
|
$v_ip = escapeshellarg($_POST['v_ip']);
|
||||||
if ($_SESSION['user'] == 'admin') {
|
|
||||||
$v_template = escapeshellarg($_POST['v_template']);
|
|
||||||
} else {
|
|
||||||
$v_template = "''";
|
|
||||||
}
|
|
||||||
if (empty($_POST['v_dns'])) $v_dns = 'off';
|
if (empty($_POST['v_dns'])) $v_dns = 'off';
|
||||||
if (empty($_POST['v_mail'])) $v_mail = 'off';
|
if (empty($_POST['v_mail'])) $v_mail = 'off';
|
||||||
if (empty($_POST['v_nginx'])) $v_nginx = 'off';
|
if (empty($_POST['v_proxy'])) $v_proxy = 'off';
|
||||||
$v_aliases = $_POST['v_aliases'];
|
$v_aliases = $_POST['v_aliases'];
|
||||||
$v_elog = $_POST['v_elog'];
|
$v_elog = $_POST['v_elog'];
|
||||||
$v_ssl = $_POST['v_ssl'];
|
$v_ssl = $_POST['v_ssl'];
|
||||||
|
@ -55,11 +50,11 @@ $v_ftp_email = $panel[$user]['CONTACT'];
|
||||||
$v_stats = escapeshellarg($_POST['v_stats']);
|
$v_stats = escapeshellarg($_POST['v_stats']);
|
||||||
$v_stats_user = $data[$v_domain]['STATS_USER'];
|
$v_stats_user = $data[$v_domain]['STATS_USER'];
|
||||||
$v_stats_password = $data[$v_domain]['STATS_PASSWORD'];
|
$v_stats_password = $data[$v_domain]['STATS_PASSWORD'];
|
||||||
$v_nginx_ext = preg_replace("/\n/", " ", $_POST['v_nginx_ext']);
|
$v_proxy_ext = preg_replace("/\n/", " ", $_POST['v_proxy_ext']);
|
||||||
$v_nginx_ext = preg_replace("/,/", " ", $v_nginx_ext);
|
$v_proxy_ext = preg_replace("/,/", " ", $v_proxy_ext);
|
||||||
$v_nginx_ext = preg_replace('/\s+/', ' ',$v_nginx_ext);
|
$v_proxy_ext = preg_replace('/\s+/', ' ',$v_proxy_ext);
|
||||||
$v_nginx_ext = trim($v_nginx_ext);
|
$v_proxy_ext = trim($v_proxy_ext);
|
||||||
$v_nginx_ext = str_replace(' ', ", ", $v_nginx_ext);
|
$v_proxy_ext = str_replace(' ', ", ", $v_proxy_ext);
|
||||||
$v_ftp = $_POST['v_ftp'];
|
$v_ftp = $_POST['v_ftp'];
|
||||||
$v_ftp_user = $_POST['v_ftp_user'];
|
$v_ftp_user = $_POST['v_ftp_user'];
|
||||||
$v_ftp_password = $_POST['v_ftp_password'];
|
$v_ftp_password = $_POST['v_ftp_password'];
|
||||||
|
@ -100,7 +95,7 @@ $v_ftp_email = $panel[$user]['CONTACT'];
|
||||||
|
|
||||||
if (empty($_SESSION['error_msg'])) {
|
if (empty($_SESSION['error_msg'])) {
|
||||||
// Add WEB
|
// Add WEB
|
||||||
exec (VESTA_CMD."v-add-web-domain ".$user." ".$v_domain." ".$v_ip." ".$v_template." 'no'", $output, $return_var);
|
exec (VESTA_CMD."v-add-web-domain ".$user." ".$v_domain." ".$v_ip." 'no'", $output, $return_var);
|
||||||
if ($return_var != 0) {
|
if ($return_var != 0) {
|
||||||
$error = implode('<br>', $output);
|
$error = implode('<br>', $output);
|
||||||
if (empty($error)) $error = __('Error code:',$return_var);
|
if (empty($error)) $error = __('Error code:',$return_var);
|
||||||
|
@ -176,11 +171,11 @@ $v_ftp_email = $panel[$user]['CONTACT'];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
// Add Nginx
|
// Add proxy
|
||||||
if (($_POST['v_nginx'] == 'on') && (empty($_SESSION['error_msg']))) {
|
if (($_POST['v_proxy'] == 'on') && (empty($_SESSION['error_msg']))) {
|
||||||
$ext = str_replace(' ', '', $v_nginx_ext);
|
$ext = str_replace(' ', '', $v_proxy_ext);
|
||||||
$ext = escapeshellarg($ext);
|
$ext = escapeshellarg($ext);
|
||||||
exec (VESTA_CMD."v-add-web-domain-nginx ".$user." ".$v_domain." 'default' ".$ext." 'no'", $output, $return_var);
|
exec (VESTA_CMD."v-add-web-domain-proxy ".$user." ".$v_domain." ".$ext." 'no'", $output, $return_var);
|
||||||
if ($return_var != 0) {
|
if ($return_var != 0) {
|
||||||
$error = implode('<br>', $output);
|
$error = implode('<br>', $output);
|
||||||
if (empty($error)) $error = __('Error code:',$return_var);
|
if (empty($error)) $error = __('Error code:',$return_var);
|
||||||
|
@ -272,7 +267,6 @@ $v_ftp_email = $panel[$user]['CONTACT'];
|
||||||
$from = __('MAIL_FROM',$hostname);
|
$from = __('MAIL_FROM',$hostname);
|
||||||
$mailtext .= __('FTP_ACCOUNT_READY',$_POST['v_domain'],$user,$_POST['v_ftp_user'],$_POST['v_ftp_password']);
|
$mailtext .= __('FTP_ACCOUNT_READY',$_POST['v_domain'],$user,$_POST['v_ftp_user'],$_POST['v_ftp_password']);
|
||||||
send_email($to, $subject, $mailtext, $from);
|
send_email($to, $subject, $mailtext, $from);
|
||||||
//unset($v_ftp_email);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
unset($v_ftp);
|
unset($v_ftp);
|
||||||
|
@ -298,6 +292,18 @@ $v_ftp_email = $panel[$user]['CONTACT'];
|
||||||
if (empty($error)) $error = __('Error code:',$return_var);
|
if (empty($error)) $error = __('Error code:',$return_var);
|
||||||
$_SESSION['error_msg'] = $error;
|
$_SESSION['error_msg'] = $error;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (empty($_SESSION['error_msg'])) {
|
||||||
|
exec (VESTA_CMD."v-restart-proxy", $output, $return_var);
|
||||||
|
if ($return_var != 0) {
|
||||||
|
$error = implode('<br>', $output);
|
||||||
|
if (empty($error)) $error = __('Error code:',$return_var);
|
||||||
|
$_SESSION['error_msg'] = $error;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (empty($_SESSION['error_msg'])) {
|
||||||
unset($output);
|
unset($output);
|
||||||
$_SESSION['ok_msg'] = __('WEB_DOMAIN_CREATED_OK',$_POST[v_domain],$_POST[v_domain]);
|
$_SESSION['ok_msg'] = __('WEB_DOMAIN_CREATED_OK',$_POST[v_domain],$_POST[v_domain]);
|
||||||
unset($v_domain);
|
unset($v_domain);
|
||||||
|
@ -314,14 +320,6 @@ $v_ftp_email = $panel[$user]['CONTACT'];
|
||||||
$ips = json_decode(implode('', $output), true);
|
$ips = json_decode(implode('', $output), true);
|
||||||
unset($output);
|
unset($output);
|
||||||
|
|
||||||
exec (VESTA_CMD."v-get-user-value ".$user." 'TEMPLATE'", $output, $return_var);
|
|
||||||
$template = $output[0] ;
|
|
||||||
unset($output);
|
|
||||||
|
|
||||||
exec (VESTA_CMD."v-list-web-templates json", $output, $return_var);
|
|
||||||
$templates = json_decode(implode('', $output), true);
|
|
||||||
unset($output);
|
|
||||||
|
|
||||||
exec (VESTA_CMD."v-list-web-stats json", $output, $return_var);
|
exec (VESTA_CMD."v-list-web-stats json", $output, $return_var);
|
||||||
$stats = json_decode(implode('', $output), true);
|
$stats = json_decode(implode('', $output), true);
|
||||||
unset($output);
|
unset($output);
|
||||||
|
|
|
@ -33,7 +33,9 @@ if ($_SESSION['user'] == 'admin') {
|
||||||
unset($output);
|
unset($output);
|
||||||
|
|
||||||
$v_package = $_GET['package'];
|
$v_package = $_GET['package'];
|
||||||
$v_template = $data[$v_package]['TEMPLATE'];
|
$v_web_template = $data[$v_package]['WEB_TEMPLATE'];
|
||||||
|
$v_proxy_template = $data[$v_package]['PROXY_TEMPLATE'];
|
||||||
|
$v_dns_template = $data[$v_package]['DNS_TEMPLATE'];
|
||||||
$v_web_domains = $data[$v_package]['WEB_DOMAINS'];
|
$v_web_domains = $data[$v_package]['WEB_DOMAINS'];
|
||||||
$v_web_aliases = $data[$v_package]['WEB_ALIASES'];
|
$v_web_aliases = $data[$v_package]['WEB_ALIASES'];
|
||||||
$v_dns_domains = $data[$v_package]['DNS_DOMAINS'];
|
$v_dns_domains = $data[$v_package]['DNS_DOMAINS'];
|
||||||
|
@ -59,7 +61,17 @@ if ($_SESSION['user'] == 'admin') {
|
||||||
|
|
||||||
exec (VESTA_CMD."v-list-web-templates json", $output, $return_var);
|
exec (VESTA_CMD."v-list-web-templates json", $output, $return_var);
|
||||||
check_error($return_var);
|
check_error($return_var);
|
||||||
$templates = json_decode(implode('', $output), true);
|
$web_templates = json_decode(implode('', $output), true);
|
||||||
|
unset($output);
|
||||||
|
|
||||||
|
exec (VESTA_CMD."v-list-web-templates-proxy json", $output, $return_var);
|
||||||
|
check_error($return_var);
|
||||||
|
$proxy_templates = json_decode(implode('', $output), true);
|
||||||
|
unset($output);
|
||||||
|
|
||||||
|
exec (VESTA_CMD."v-list-dns-templates json", $output, $return_var);
|
||||||
|
check_error($return_var);
|
||||||
|
$dns_templates = json_decode(implode('', $output), true);
|
||||||
unset($output);
|
unset($output);
|
||||||
|
|
||||||
exec (VESTA_CMD."v-list-sys-shells json", $output, $return_var);
|
exec (VESTA_CMD."v-list-sys-shells json", $output, $return_var);
|
||||||
|
@ -71,7 +83,9 @@ if ($_SESSION['user'] == 'admin') {
|
||||||
if (!empty($_POST['save'])) {
|
if (!empty($_POST['save'])) {
|
||||||
// Check input
|
// Check input
|
||||||
if (empty($_POST['v_package'])) $errors[] = __('package');
|
if (empty($_POST['v_package'])) $errors[] = __('package');
|
||||||
if (empty($_POST['v_template'])) $errors[] = __('template');
|
if (empty($_POST['v_web_template'])) $errors[] = __('web template');
|
||||||
|
if (empty($_POST['v_proxy_template'])) $errors[] = __('proxy template');
|
||||||
|
if (empty($_POST['v_dns_template'])) $errors[] = __('dns template');
|
||||||
if (empty($_POST['v_shell'])) $errrors[] = __('shell');
|
if (empty($_POST['v_shell'])) $errrors[] = __('shell');
|
||||||
if (!isset($_POST['v_web_domains'])) $errors[] = __('web domains');
|
if (!isset($_POST['v_web_domains'])) $errors[] = __('web domains');
|
||||||
if (!isset($_POST['v_web_aliases'])) $errors[] = __('web aliases');
|
if (!isset($_POST['v_web_aliases'])) $errors[] = __('web aliases');
|
||||||
|
@ -89,7 +103,9 @@ if ($_SESSION['user'] == 'admin') {
|
||||||
|
|
||||||
// Protect input
|
// Protect input
|
||||||
$v_package = escapeshellarg($_POST['v_package']);
|
$v_package = escapeshellarg($_POST['v_package']);
|
||||||
$v_template = escapeshellarg($_POST['v_template']);
|
$v_web_template = escapeshellarg($_POST['v_web_template']);
|
||||||
|
$v_proxy_template = escapeshellarg($_POST['v_proxy_template']);
|
||||||
|
$v_dns_template = escapeshellarg($_POST['v_dns_template']);
|
||||||
$v_shell = escapeshellarg($_POST['v_shell']);
|
$v_shell = escapeshellarg($_POST['v_shell']);
|
||||||
$v_web_domains = escapeshellarg($_POST['v_web_domains']);
|
$v_web_domains = escapeshellarg($_POST['v_web_domains']);
|
||||||
$v_web_aliases = escapeshellarg($_POST['v_web_aliases']);
|
$v_web_aliases = escapeshellarg($_POST['v_web_aliases']);
|
||||||
|
@ -129,7 +145,9 @@ if ($_SESSION['user'] == 'admin') {
|
||||||
unset($output);
|
unset($output);
|
||||||
|
|
||||||
// Create package
|
// Create package
|
||||||
$pkg = "TEMPLATE=".$v_template."\n";
|
$pkg = "WEB_TEMPLATE=".$v_web_template."\n";
|
||||||
|
$pkg .= "PROXY_TEMPLATE=".$v_proxy_template."\n";
|
||||||
|
$pkg .= "DNS_TEMPLATE=".$v_dns_template."\n";
|
||||||
$pkg .= "WEB_DOMAINS=".$v_web_domains."\n";
|
$pkg .= "WEB_DOMAINS=".$v_web_domains."\n";
|
||||||
$pkg .= "WEB_ALIASES=".$v_web_aliases."\n";
|
$pkg .= "WEB_ALIASES=".$v_web_aliases."\n";
|
||||||
$pkg .= "DNS_DOMAINS=".$v_dns_domains."\n";
|
$pkg .= "DNS_DOMAINS=".$v_dns_domains."\n";
|
||||||
|
|
|
@ -32,7 +32,6 @@ if ($_SESSION['user'] == 'admin') {
|
||||||
$v_username = $_GET['user'];
|
$v_username = $_GET['user'];
|
||||||
$v_password = "••••••••";
|
$v_password = "••••••••";
|
||||||
$v_email = $data[$v_username]['CONTACT'];
|
$v_email = $data[$v_username]['CONTACT'];
|
||||||
$v_template = $data[$v_username]['TEMPLATE'];
|
|
||||||
$v_package = $data[$v_username]['PACKAGE'];
|
$v_package = $data[$v_username]['PACKAGE'];
|
||||||
$v_language = $data[$v_username]['LANGUAGE'];
|
$v_language = $data[$v_username]['LANGUAGE'];
|
||||||
$v_fname = $data[$v_username]['FNAME'];
|
$v_fname = $data[$v_username]['FNAME'];
|
||||||
|
@ -61,10 +60,6 @@ if ($_SESSION['user'] == 'admin') {
|
||||||
$languages = json_decode(implode('', $output), true);
|
$languages = json_decode(implode('', $output), true);
|
||||||
unset($output);
|
unset($output);
|
||||||
|
|
||||||
exec (VESTA_CMD."v-list-web-templates json", $output, $return_var);
|
|
||||||
$templates = json_decode(implode('', $output), true);
|
|
||||||
unset($output);
|
|
||||||
|
|
||||||
exec (VESTA_CMD."v-list-sys-shells json", $output, $return_var);
|
exec (VESTA_CMD."v-list-sys-shells json", $output, $return_var);
|
||||||
$shells = json_decode(implode('', $output), true);
|
$shells = json_decode(implode('', $output), true);
|
||||||
unset($output);
|
unset($output);
|
||||||
|
@ -113,18 +108,6 @@ if ($_SESSION['user'] == 'admin') {
|
||||||
unset($output);
|
unset($output);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Change template
|
|
||||||
if (($v_template != $_POST['v_template']) && (empty($_SESSION['error_msg']))) {
|
|
||||||
$v_template = escapeshellarg($_POST['v_template']);
|
|
||||||
exec (VESTA_CMD."v-change-user-template ".$v_username." ".$v_template, $output, $return_var);
|
|
||||||
if ($return_var != 0) {
|
|
||||||
$error = implode('<br>', $output);
|
|
||||||
if (empty($error)) $error = __('Error code:',$return_var);
|
|
||||||
$_SESSION['error_msg'] = $error;
|
|
||||||
}
|
|
||||||
unset($output);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Change shell
|
// Change shell
|
||||||
if (($v_shell != $_POST['v_shell']) && (empty($_SESSION['error_msg']))) {
|
if (($v_shell != $_POST['v_shell']) && (empty($_SESSION['error_msg']))) {
|
||||||
$v_shell = escapeshellarg($_POST['v_shell']);
|
$v_shell = escapeshellarg($_POST['v_shell']);
|
||||||
|
|
|
@ -54,8 +54,9 @@ if ($return_var != 0) {
|
||||||
$v_ssl_ca = $ssl_str[$v_domain]['CA'];
|
$v_ssl_ca = $ssl_str[$v_domain]['CA'];
|
||||||
}
|
}
|
||||||
$v_ssl_home = $data[$v_domain]['SSL_HOME'];
|
$v_ssl_home = $data[$v_domain]['SSL_HOME'];
|
||||||
$v_nginx = $data[$v_domain]['NGINX'];
|
$v_proxy = $data[$v_domain]['PROXY'];
|
||||||
$v_nginx_ext = str_replace(',', ', ', $data[$v_domain]['NGINX_EXT']);
|
$v_proxy_template = $data[$v_domain]['PROXY'];
|
||||||
|
$v_proxy_ext = str_replace(',', ', ', $data[$v_domain]['PROXY_EXT']);
|
||||||
$v_stats = $data[$v_domain]['STATS'];
|
$v_stats = $data[$v_domain]['STATS'];
|
||||||
$v_stats_user = $data[$v_domain]['STATS_USER'];
|
$v_stats_user = $data[$v_domain]['STATS_USER'];
|
||||||
if (!empty($v_stats_user)) $v_stats_password = "••••••••";
|
if (!empty($v_stats_user)) $v_stats_password = "••••••••";
|
||||||
|
@ -78,6 +79,10 @@ if ($return_var != 0) {
|
||||||
$templates = json_decode(implode('', $output), true);
|
$templates = json_decode(implode('', $output), true);
|
||||||
unset($output);
|
unset($output);
|
||||||
|
|
||||||
|
exec (VESTA_CMD."v-list-web-templates-proxy json", $output, $return_var);
|
||||||
|
$proxy_templates = json_decode(implode('', $output), true);
|
||||||
|
unset($output);
|
||||||
|
|
||||||
exec (VESTA_CMD."v-list-web-stats json", $output, $return_var);
|
exec (VESTA_CMD."v-list-web-stats json", $output, $return_var);
|
||||||
$stats = json_decode(implode('', $output), true);
|
$stats = json_decode(implode('', $output), true);
|
||||||
unset($output);
|
unset($output);
|
||||||
|
@ -200,56 +205,56 @@ if (!empty($_POST['save'])) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Nginx
|
// Proxy
|
||||||
if ((!empty($v_nginx)) && (empty($_POST['v_nginx'])) && (empty($_SESSION['error_msg']))) {
|
if ((!empty($v_proxy)) && (empty($_POST['v_proxy'])) && (empty($_SESSION['error_msg']))) {
|
||||||
exec (VESTA_CMD."v-delete-web-domain-nginx ".$v_username." ".$v_domain." 'no'", $output, $return_var);
|
exec (VESTA_CMD."v-delete-web-domain-proxy ".$v_username." ".$v_domain." 'no'", $output, $return_var);
|
||||||
if ($return_var != 0) {
|
if ($return_var != 0) {
|
||||||
$error = implode('<br>', $output);
|
$error = implode('<br>', $output);
|
||||||
if (empty($error)) $error = __('Error code:',$return_var);
|
if (empty($error)) $error = __('Error code:',$return_var);
|
||||||
$_SESSION['error_msg'] = $error;
|
$_SESSION['error_msg'] = $error;
|
||||||
}
|
}
|
||||||
unset($output);
|
unset($output);
|
||||||
unset($v_nginx);
|
unset($v_proxy);
|
||||||
$restart_web = 'yes';
|
$restart_proxy = 'yes';
|
||||||
}
|
}
|
||||||
if ((!empty($v_nginx)) && (!empty($_POST['v_nginx'])) && (empty($_SESSION['error_msg']))) {
|
if ((!empty($v_proxy)) && (!empty($_POST['v_proxy'])) && (empty($_SESSION['error_msg']))) {
|
||||||
$ext = preg_replace("/\n/", " ", $_POST['v_nginx_ext']);
|
$ext = preg_replace("/\n/", " ", $_POST['v_proxy_ext']);
|
||||||
$ext = preg_replace("/,/", " ", $ext);
|
$ext = preg_replace("/,/", " ", $ext);
|
||||||
$ext = preg_replace('/\s+/', ' ',$ext);
|
$ext = preg_replace('/\s+/', ' ',$ext);
|
||||||
$ext = trim($ext);
|
$ext = trim($ext);
|
||||||
$ext = str_replace(' ', ", ", $ext);
|
$ext = str_replace(' ', ", ", $ext);
|
||||||
if ( $v_nginx_ext != $ext ) {
|
if (( $v_proxy_template != $_POST['v_proxy_template']) || ($v_proxy_ext != $ext)) {
|
||||||
$ext = str_replace(', ', ",", $ext);
|
$ext = str_replace(', ', ",", $ext);
|
||||||
exec (VESTA_CMD."v-change-web-domain-nginx-tpl ".$v_username." ".$v_domain." 'default' ".escapeshellarg($ext)." 'no'", $output, $return_var);
|
exec (VESTA_CMD."v-change-web-domain-proxy-tpl ".$v_username." ".$v_domain." ".escapeshellarg($_POST['v_proxy_template'])." ".escapeshellarg($ext)." 'no'", $output, $return_var);
|
||||||
if ($return_var != 0) {
|
if ($return_var != 0) {
|
||||||
$error = implode('<br>', $output);
|
$error = implode('<br>', $output);
|
||||||
if (empty($error)) $error = __('Error code:',$return_var);
|
if (empty($error)) $error = __('Error code:',$return_var);
|
||||||
$_SESSION['error_msg'] = $error;
|
$_SESSION['error_msg'] = $error;
|
||||||
}
|
}
|
||||||
$v_nginx_ext = str_replace(',', ', ', $ext);
|
$v_proxy_template = $_POST['v_proxy_template'];
|
||||||
|
$v_proxy_ext = str_replace(',', ', ', $ext);
|
||||||
unset($output);
|
unset($output);
|
||||||
$restart_web = 'yes';
|
$restart_proxy = 'yes';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ((empty($v_nginx)) && (!empty($_POST['v_nginx'])) && (empty($_SESSION['error_msg']))) {
|
if ((empty($v_proxy)) && (!empty($_POST['v_proxy'])) && (empty($_SESSION['error_msg']))) {
|
||||||
$nginx_ext = "'jpg,jpeg,gif,png,ico,css,zip,tgz,gz,rar,bz2,doc,xls,exe,pdf,ppt,txt,tar,wav,bmp,rtf,js,mp3,avi,mpeg,html,htm'";
|
$v_proxy_template = $_POST['v_proxy_template'];
|
||||||
if (!empty($_POST['v_nginx_ext'])) {
|
if (!empty($_POST['v_proxy_ext'])) {
|
||||||
$ext = preg_replace("/\n/", " ", $_POST['v_nginx_ext']);
|
$ext = preg_replace("/\n/", " ", $_POST['v_proxy_ext']);
|
||||||
$ext = preg_replace("/,/", " ", $ext);
|
$ext = preg_replace("/,/", " ", $ext);
|
||||||
$ext = preg_replace('/\s+/', ' ',$ext);
|
$ext = preg_replace('/\s+/', ' ',$ext);
|
||||||
$ext = trim($ext);
|
$ext = trim($ext);
|
||||||
$ext = str_replace(' ', ",", $ext);
|
$ext = str_replace(' ', ",", $ext);
|
||||||
$v_nginx_ext = str_replace(',', ', ', $ext);
|
$v_proxy_ext = str_replace(',', ', ', $ext);
|
||||||
}
|
}
|
||||||
exec (VESTA_CMD."v-add-web-domain-nginx ".$v_username." ".$v_domain." 'default' ".escapeshellarg($ext)." 'no'", $output, $return_var);
|
exec (VESTA_CMD."v-add-web-domain-proxy ".$v_username." ".$v_domain." ".escapeshellarg($v_proxy_template)." ".escapeshellarg($ext)." 'no'", $output, $return_var);
|
||||||
if ($return_var != 0) {
|
if ($return_var != 0) {
|
||||||
$error = implode('<br>', $output);
|
$error = implode('<br>', $output);
|
||||||
if (empty($error)) $error = __('Error code:',$return_var);
|
if (empty($error)) $error = __('Error code:',$return_var);
|
||||||
$_SESSION['error_msg'] = $error;
|
$_SESSION['error_msg'] = $error;
|
||||||
}
|
}
|
||||||
unset($output);
|
unset($output);
|
||||||
$v_nginx = 'default';
|
$restart_proxy = 'yes';
|
||||||
$restart_web = 'yes';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// SSL
|
// SSL
|
||||||
|
|
|
@ -134,6 +134,9 @@ $LANG['en'] = array(
|
||||||
'Databases' => 'Databases',
|
'Databases' => 'Databases',
|
||||||
'User Directories' => 'User Directories',
|
'User Directories' => 'User Directories',
|
||||||
'Template' => 'Template',
|
'Template' => 'Template',
|
||||||
|
'Web Template' => 'Apache Template',
|
||||||
|
'Proxy Template' => 'Nginx Template',
|
||||||
|
'DNS Template' => 'DNS Template',
|
||||||
'Web Domains' => 'Web Domains',
|
'Web Domains' => 'Web Domains',
|
||||||
'SSL Domains' => 'SSL Domains',
|
'SSL Domains' => 'SSL Domains',
|
||||||
'Web Aliases' => 'Web Aliases',
|
'Web Aliases' => 'Web Aliases',
|
||||||
|
@ -151,8 +154,8 @@ $LANG['en'] = array(
|
||||||
'template' => 'template',
|
'template' => 'template',
|
||||||
'SSL Support' => 'SSL Support',
|
'SSL Support' => 'SSL Support',
|
||||||
'SSL Home Directory' => 'SSL Home',
|
'SSL Home Directory' => 'SSL Home',
|
||||||
'Nginx Support' => 'Nginx Support',
|
'Proxy Support' => 'Nginx Support',
|
||||||
'Nginx Extentions' => 'Nginx Extentions',
|
'Proxy Extentions' => 'Nginx Extentions',
|
||||||
'Web Statistics' => 'Web Statistics',
|
'Web Statistics' => 'Web Statistics',
|
||||||
'Additional FTP Account' => 'Additional FTP',
|
'Additional FTP Account' => 'Additional FTP',
|
||||||
'SOA' => 'SOA',
|
'SOA' => 'SOA',
|
||||||
|
@ -231,8 +234,6 @@ $LANG['en'] = array(
|
||||||
'Mail Support' => 'Mail Support',
|
'Mail Support' => 'Mail Support',
|
||||||
'Advanced options' => 'Advanced options',
|
'Advanced options' => 'Advanced options',
|
||||||
'Aliases' => 'Aliases',
|
'Aliases' => 'Aliases',
|
||||||
'Apache template' => 'Apache template',
|
|
||||||
'Nginx template' => 'Nginx template',
|
|
||||||
'SSL Certificate' => 'SSL Certificate',
|
'SSL Certificate' => 'SSL Certificate',
|
||||||
'SSL Key' => 'SSL Key',
|
'SSL Key' => 'SSL Key',
|
||||||
'SSL Certificate Authority / Intermediate' => 'SSL Certificate Authority / Intermediate',
|
'SSL Certificate Authority / Intermediate' => 'SSL Certificate Authority / Intermediate',
|
||||||
|
|
|
@ -133,6 +133,9 @@ $LANG['es'] = array(
|
||||||
'Databases' => 'Base de Datos',
|
'Databases' => 'Base de Datos',
|
||||||
'User Directories' => 'Directorios de Usuario',
|
'User Directories' => 'Directorios de Usuario',
|
||||||
'Template' => 'Plantilla',
|
'Template' => 'Plantilla',
|
||||||
|
'Web Template' => 'Plantilla Apache',
|
||||||
|
'Proxy Template' => 'Plantilla Nginx',
|
||||||
|
'DNS Template' => 'Plantilla DNS',
|
||||||
'Web Domains' => 'Dominios Web',
|
'Web Domains' => 'Dominios Web',
|
||||||
'SSL Domains' => 'Dominios SSL',
|
'SSL Domains' => 'Dominios SSL',
|
||||||
'Web Aliases' => 'Alias Web',
|
'Web Aliases' => 'Alias Web',
|
||||||
|
@ -150,8 +153,8 @@ $LANG['es'] = array(
|
||||||
'template' => 'plantilla',
|
'template' => 'plantilla',
|
||||||
'SSL Support' => 'Soporte SSL',
|
'SSL Support' => 'Soporte SSL',
|
||||||
'SSL Home Directory' => 'SSL Home',
|
'SSL Home Directory' => 'SSL Home',
|
||||||
'Nginx Support' => 'Soporte Nginx',
|
'Proxy Support' => 'Soporte Nginx',
|
||||||
'Nginx Extentions' => 'Extensiones Nginx',
|
'Proxy Extentions' => 'Extensiones Nginx',
|
||||||
'Web Statistics' => 'Estadísticas Web',
|
'Web Statistics' => 'Estadísticas Web',
|
||||||
'Additional FTP Account' => 'Cuenta Adicional FTP',
|
'Additional FTP Account' => 'Cuenta Adicional FTP',
|
||||||
'SOA' => 'SOA',
|
'SOA' => 'SOA',
|
||||||
|
@ -230,8 +233,6 @@ $LANG['es'] = array(
|
||||||
'Mail Support' => 'Soporte para Correo',
|
'Mail Support' => 'Soporte para Correo',
|
||||||
'Advanced options' => 'Opciones Avanzadas',
|
'Advanced options' => 'Opciones Avanzadas',
|
||||||
'Aliases' => 'Aliases',
|
'Aliases' => 'Aliases',
|
||||||
'Apache template' => 'Plantilla Apache',
|
|
||||||
'Nginx template' => 'Plantilla Nginx',
|
|
||||||
'SSL Certificate' => 'Certificado SSL',
|
'SSL Certificate' => 'Certificado SSL',
|
||||||
'SSL Key' => 'Llave SSL',
|
'SSL Key' => 'Llave SSL',
|
||||||
'SSL Certificate Authority / Intermediate' => 'Certificado SSL Autoridad / Intermedio',
|
'SSL Certificate Authority / Intermediate' => 'Certificado SSL Autoridad / Intermedio',
|
||||||
|
|
|
@ -135,6 +135,9 @@ $LANG['ro'] = array(
|
||||||
'Databases' => 'Baze de date',
|
'Databases' => 'Baze de date',
|
||||||
'User Directories' => 'Directoare utilizator',
|
'User Directories' => 'Directoare utilizator',
|
||||||
'Template' => 'Șablon',
|
'Template' => 'Șablon',
|
||||||
|
'Web Template' => 'Șablonul Apache',
|
||||||
|
'Proxy Template' => 'Șablonul Nginx',
|
||||||
|
'DNS Template' => 'Șablonul DNS',
|
||||||
'Web Domains' => 'Web domenii',
|
'Web Domains' => 'Web domenii',
|
||||||
'SSL Domains' => 'SSL domenii',
|
'SSL Domains' => 'SSL domenii',
|
||||||
'Web Aliases' => 'Web aliasuri',
|
'Web Aliases' => 'Web aliasuri',
|
||||||
|
@ -152,8 +155,8 @@ $LANG['ro'] = array(
|
||||||
'template' => 'șablon',
|
'template' => 'șablon',
|
||||||
'SSL Support' => 'Support SSL',
|
'SSL Support' => 'Support SSL',
|
||||||
'SSL Home Directory' => 'Mapa SSL',
|
'SSL Home Directory' => 'Mapa SSL',
|
||||||
'Nginx Support' => 'Support Nginx',
|
'Proxy Support' => 'Support Nginx',
|
||||||
'Nginx Extentions' => 'Extensii Nginx',
|
'Proxy Extentions' => 'Extensii Nginx',
|
||||||
'Web Statistics' => 'Statistici web',
|
'Web Statistics' => 'Statistici web',
|
||||||
'Additional FTP Account' => 'Cont suplimentar FTP',
|
'Additional FTP Account' => 'Cont suplimentar FTP',
|
||||||
'SOA' => 'SOA',
|
'SOA' => 'SOA',
|
||||||
|
@ -232,8 +235,6 @@ $LANG['ro'] = array(
|
||||||
'Mail Support' => 'Support E-mail',
|
'Mail Support' => 'Support E-mail',
|
||||||
'Advanced options' => 'Opțiuni avansate',
|
'Advanced options' => 'Opțiuni avansate',
|
||||||
'Aliases' => 'Aliasuri',
|
'Aliases' => 'Aliasuri',
|
||||||
'Apache template' => 'Șablonul Apache',
|
|
||||||
'Nginx template' => 'Șablonul Nginx',
|
|
||||||
'SSL Certificate' => 'Certificat SSL',
|
'SSL Certificate' => 'Certificat SSL',
|
||||||
'SSL Key' => 'Cheia SSL',
|
'SSL Key' => 'Cheia SSL',
|
||||||
'SSL Certificate Authority / Intermediate' => 'SSL Intermediar / Certificate Authority',
|
'SSL Certificate Authority / Intermediate' => 'SSL Intermediar / Certificate Authority',
|
||||||
|
|
|
@ -135,6 +135,9 @@ $LANG['ru'] = array(
|
||||||
'Databases' => 'Базы данных',
|
'Databases' => 'Базы данных',
|
||||||
'User Directories' => 'Папки пользователя',
|
'User Directories' => 'Папки пользователя',
|
||||||
'Template' => 'Шаблон',
|
'Template' => 'Шаблон',
|
||||||
|
'Web Template' => 'Шаблон Apache',
|
||||||
|
'Proxy Template' => 'Шаблон Nginx',
|
||||||
|
'DNS Template' => 'DNS Template',
|
||||||
'Web Domains' => 'Веб домены',
|
'Web Domains' => 'Веб домены',
|
||||||
'SSL Domains' => 'SSL домены',
|
'SSL Domains' => 'SSL домены',
|
||||||
'Web Aliases' => 'Веб алиасы',
|
'Web Aliases' => 'Веб алиасы',
|
||||||
|
@ -152,8 +155,8 @@ $LANG['ru'] = array(
|
||||||
'template' => 'шаблон',
|
'template' => 'шаблон',
|
||||||
'SSL Support' => 'Поддержка SSL',
|
'SSL Support' => 'Поддержка SSL',
|
||||||
'SSL Home Directory' => 'Директория SSL',
|
'SSL Home Directory' => 'Директория SSL',
|
||||||
'Nginx Support' => 'Поддержка Nginx',
|
'Proxy Support' => 'Поддержка Nginx',
|
||||||
'Nginx Extentions' => 'Обработка Nginx',
|
'Proxy Extentions' => 'Обработка Nginx',
|
||||||
'Web Statistics' => 'Статистика сайта',
|
'Web Statistics' => 'Статистика сайта',
|
||||||
'Additional FTP Account' => 'Дополнительный ftp',
|
'Additional FTP Account' => 'Дополнительный ftp',
|
||||||
'SOA' => 'SOA',
|
'SOA' => 'SOA',
|
||||||
|
@ -232,8 +235,6 @@ $LANG['ru'] = array(
|
||||||
'Mail Support' => 'Поддержка почты',
|
'Mail Support' => 'Поддержка почты',
|
||||||
'Advanced options' => 'Дополнительные опции',
|
'Advanced options' => 'Дополнительные опции',
|
||||||
'Aliases' => 'Алиасы',
|
'Aliases' => 'Алиасы',
|
||||||
'Apache template' => 'Шаблон Apache',
|
|
||||||
'Nginx template' => 'Шаблон для Nginx',
|
|
||||||
'SSL Certificate' => 'SSL сертификат',
|
'SSL Certificate' => 'SSL сертификат',
|
||||||
'SSL Key' => 'Ключ SSL сертификата',
|
'SSL Key' => 'Ключ SSL сертификата',
|
||||||
'SSL Certificate Authority / Intermediate' => 'Центр сертификации SSL / Intermediate',
|
'SSL Certificate Authority / Intermediate' => 'Центр сертификации SSL / Intermediate',
|
||||||
|
|
|
@ -135,6 +135,9 @@ $LANG['ua'] = array(
|
||||||
'Databases' => 'Бази даних',
|
'Databases' => 'Бази даних',
|
||||||
'User Directories' => 'Теки Користувача',
|
'User Directories' => 'Теки Користувача',
|
||||||
'Template' => 'Шаблон',
|
'Template' => 'Шаблон',
|
||||||
|
'Web Template' => 'Шаблон Apache',
|
||||||
|
'Proxy Template' => 'Шаблон Nginx',
|
||||||
|
'DNS Template' => 'Шаблон DNS',
|
||||||
'Web Domains' => 'Веб домени',
|
'Web Domains' => 'Веб домени',
|
||||||
'SSL Domains' => 'SSL домени',
|
'SSL Domains' => 'SSL домени',
|
||||||
'Web Aliases' => 'Веб аліаси',
|
'Web Aliases' => 'Веб аліаси',
|
||||||
|
@ -152,8 +155,8 @@ $LANG['ua'] = array(
|
||||||
'template' => 'шаблон',
|
'template' => 'шаблон',
|
||||||
'SSL Support' => 'Підтримка SSL',
|
'SSL Support' => 'Підтримка SSL',
|
||||||
'SSL Home Directory' => 'Тека SSL',
|
'SSL Home Directory' => 'Тека SSL',
|
||||||
'Nginx Support' => 'Підтримка Nginx',
|
'Proxy Support' => 'Підтримка Nginx',
|
||||||
'Nginx Extentions' => 'Опрацювання Nginx',
|
'Proxy Extentions' => 'Опрацювання Nginx',
|
||||||
'Web Statistics' => 'Статистика сайту',
|
'Web Statistics' => 'Статистика сайту',
|
||||||
'Additional FTP Account' => 'Додатковий ftp',
|
'Additional FTP Account' => 'Додатковий ftp',
|
||||||
'SOA' => 'SOA',
|
'SOA' => 'SOA',
|
||||||
|
@ -232,8 +235,6 @@ $LANG['ua'] = array(
|
||||||
'Mail Support' => 'Підтримка пошти',
|
'Mail Support' => 'Підтримка пошти',
|
||||||
'Advanced options' => 'Додаткові опції',
|
'Advanced options' => 'Додаткові опції',
|
||||||
'Aliases' => 'Аліаси',
|
'Aliases' => 'Аліаси',
|
||||||
'Apache template' => 'Шаблон Apache',
|
|
||||||
'Nginx template' => 'Шаблон Nginx',
|
|
||||||
'SSL Certificate' => 'SSL сертификат',
|
'SSL Certificate' => 'SSL сертификат',
|
||||||
'SSL Key' => 'Ключ SSL сертифікату',
|
'SSL Key' => 'Ключ SSL сертифікату',
|
||||||
'SSL Certificate Authority / Intermediate' => 'Центр сертифікації SSL / Intermediate',
|
'SSL Certificate Authority / Intermediate' => 'Центр сертифікації SSL / Intermediate',
|
||||||
|
|
|
@ -150,17 +150,17 @@ function humanize_usage($usage) {
|
||||||
if ( $usage > 1000 ) {
|
if ( $usage > 1000 ) {
|
||||||
$usage = $usage / 1000 ;
|
$usage = $usage / 1000 ;
|
||||||
$usage = number_format($usage, 2);
|
$usage = number_format($usage, 2);
|
||||||
$usage = $usage." ".__('pb');
|
$usage = $usage."".__('pb');
|
||||||
} else {
|
} else {
|
||||||
$usage = number_format($usage, 2);
|
$usage = number_format($usage, 2);
|
||||||
$usage = $usage." ".__('tb');
|
$usage = $usage."".__('tb');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$usage = number_format($usage, 2);
|
$usage = number_format($usage, 2);
|
||||||
$usage = $usage." ".__('gb');
|
$usage = $usage."".__('gb');
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
$usage = $usage." ".__('mb');
|
$usage = $usage."".__('mb');
|
||||||
}
|
}
|
||||||
return $usage;
|
return $usage;
|
||||||
}
|
}
|
||||||
|
|
|
@ -67,7 +67,7 @@
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="vst-text" style="padding: 10 0 0 2px;">
|
<td class="vst-text" style="padding: 10px 0 0 2px;">
|
||||||
<?php print __('Database');?>
|
<?php print __('Database');?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -97,7 +97,7 @@
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="vst-text" style="padding: 10 0 0 2px;">
|
<td class="vst-text" style="padding: 10px 0 0 2px;">
|
||||||
<?php print __('Type');?>
|
<?php print __('Type');?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -115,7 +115,7 @@
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="vst-text" style="padding: 10 0 0 2px;">
|
<td class="vst-text" style="padding: 10px 0 0 2px;">
|
||||||
<?php print __('Charset');?>
|
<?php print __('Charset');?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -81,29 +81,6 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td class="vst-text" style="padding: 10px 0 0 0px;">
|
<td class="vst-text" style="padding: 10px 0 0 0px;">
|
||||||
<table style="display:<?php if (empty($v_adv)) echo 'none';?> ;" id="advtable">
|
<table style="display:<?php if (empty($v_adv)) echo 'none';?> ;" id="advtable">
|
||||||
<tr>
|
|
||||||
<td class="vst-text" style="padding: 10px 0 0 2px;">
|
|
||||||
<?php print __('Template');?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<select class="vst-list" name="v_template">
|
|
||||||
<?php
|
|
||||||
foreach ($templates as $key => $value) {
|
|
||||||
echo "\n\t\t\t\t\t\\t\t\t\t<option value=\"".$value."\"";
|
|
||||||
if ((!empty($v_template)) && ( $value == $_POST['v_template'])){
|
|
||||||
echo ' selected' ;
|
|
||||||
}
|
|
||||||
if ((empty($v_template)) && ( $value == $template)){
|
|
||||||
echo ' selected' ;
|
|
||||||
}
|
|
||||||
echo ">".$value."</option>\n";
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="vst-text" style="padding: 10px 0 0 2px;">
|
<td class="vst-text" style="padding: 10px 0 0 2px;">
|
||||||
<?php print __('Expiration Date');?> <span style="padding:0 0 0 6px; font-size: 10pt; color:#555;">(<?php print __('YYYY-MM-DD');?>)</span>
|
<?php print __('Expiration Date');?> <span style="padding:0 0 0 6px; font-size: 10pt; color:#555;">(<?php print __('YYYY-MM-DD');?>)</span>
|
||||||
|
|
|
@ -54,19 +54,65 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="vst-text" style="padding: 10px 0 0 2px;">
|
<td class="vst-text" style="padding: 10px 0 0 2px;">
|
||||||
<?php print __('Default Template');?>
|
<?php print __('Web Template');?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<select class="vst-list" name="v_template">
|
<select class="vst-list" name="v_web_template">
|
||||||
<?php
|
<?php
|
||||||
foreach ($templates as $key => $value) {
|
foreach ($web_templates as $key => $value) {
|
||||||
echo "\t\t\t\t<option value=\"".$value."\"";
|
echo "\t\t\t\t<option value=\"".$value."\"";
|
||||||
if ((!empty($v_template)) && ( $value == $v_template)){
|
if ((!empty($v_web_template)) && ( $value == $v_web_template)){
|
||||||
echo 'selected' ;
|
echo 'selected' ;
|
||||||
}
|
}
|
||||||
if ((!empty($v_template)) && ( $value == $_POST['v_template'])){
|
if ((!empty($v_web_template)) && ( $value == $_POST['v_web_template'])){
|
||||||
|
echo 'selected' ;
|
||||||
|
}
|
||||||
|
echo ">".$value."</option>\n";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="vst-text" style="padding: 10px 0 0 2px;">
|
||||||
|
<?php print __('Proxy Template');?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<select class="vst-list" name="v_proxy_template">
|
||||||
|
<?php
|
||||||
|
foreach ($proxy_templates as $key => $value) {
|
||||||
|
echo "\t\t\t\t<option value=\"".$value."\"";
|
||||||
|
if ((!empty($v_proxy_template)) && ( $value == $v_proxy_template)){
|
||||||
|
echo 'selected' ;
|
||||||
|
}
|
||||||
|
if ((!empty($v_proxy_template)) && ( $value == $_POST['v_proxy_template'])){
|
||||||
|
echo 'selected' ;
|
||||||
|
}
|
||||||
|
echo ">".$value."</option>\n";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="vst-text" style="padding: 10px 0 0 2px;">
|
||||||
|
<?php print __('DNS Template');?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<select class="vst-list" name="v_dns_template">
|
||||||
|
<?php
|
||||||
|
foreach ($dns_templates as $key => $value) {
|
||||||
|
echo "\t\t\t\t<option value=\"".$value."\"";
|
||||||
|
if ((!empty($v_dns_template)) && ( $value == $v_dns_template)){
|
||||||
|
echo 'selected' ;
|
||||||
|
}
|
||||||
|
if ((!empty($v_dns_template)) && ( $value == $_POST['v_dns_template'])){
|
||||||
echo 'selected' ;
|
echo 'selected' ;
|
||||||
}
|
}
|
||||||
echo ">".$value."</option>\n";
|
echo ">".$value."</option>\n";
|
||||||
|
|
|
@ -143,7 +143,7 @@
|
||||||
</table>
|
</table>
|
||||||
<table class="data-col2" width="600px" style="display:<?php if (empty($v_adv)) echo 'none';?> ;" id="advtable">
|
<table class="data-col2" width="600px" style="display:<?php if (empty($v_adv)) echo 'none';?> ;" id="advtable">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="vst-text" style="padding: 10 0 0 2px;">
|
<td class="vst-text" style="padding: 10px 0 0 2px;">
|
||||||
<?php print __('Aliases');?>
|
<?php print __('Aliases');?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -154,48 +154,25 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="vst-text" style="padding: 10px 0 0 2px;">
|
<td class="vst-text" style="padding: 10px 0 0 2px;">
|
||||||
<?php print __('Apache template');?>
|
<?php print __('Proxy Support');?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<select class="vst-list" name="v_template">
|
<input type="checkbox" size="20" class="vst-checkbox" name="v_proxy" <?php if ($v_proxy !== 'off') echo "checked=yes" ?> onclick="javascript:elementHideShow('proxytable');">
|
||||||
<?php
|
|
||||||
foreach ($templates as $key => $value) {
|
|
||||||
echo "\t\t\t\t<option value=\"".$value."\"";
|
|
||||||
if ((!empty($v_template)) && ( $value == $_POST['v_template'])){
|
|
||||||
echo ' selected' ;
|
|
||||||
}
|
|
||||||
if ((empty($v_template)) && ( $value == $template)){
|
|
||||||
echo ' selected' ;
|
|
||||||
}
|
|
||||||
echo "> ".$value." </option>\n";
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="vst-text" style="padding: 10px 0 0 2px;">
|
|
||||||
<?php print __('Nginx Support');?>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<input type="checkbox" size="20" class="vst-checkbox" name="v_nginx" <?php if ($v_nginx !== 'off') echo "checked=yes" ?> onclick="javascript:elementHideShow('nginxtable');">
|
<table style="display:<?php if ($v_proxy == 'off') { echo 'none';} else {echo 'block';}?>;" id="proxytable" >
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<table style="display:<?php if ($v_nginx == 'off') { echo 'none';} else {echo 'block';}?>;" id="nginxtable" >
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="vst-text" style="padding: 9px 0 0 0;">
|
<td class="vst-text" style="padding: 9px 0 0 0;">
|
||||||
<?php print __('Nginx Extentions');?>
|
<?php print __('Proxy Extentions');?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<textarea size="20" class="vst-textinput" name="v_nginx_ext"><?php if (!empty($v_nginx_ext)) { echo $v_nginx_ext;} else { echo 'jpg, jpeg, gif, png, ico, svg, css, zip, tgz, gz, rar, bz2, exe, pdf, doc, xls, ppt, txt, odt, ods, odp, odf, tar, bmp, rtf, js, mp3, avi, mpeg, flv, html, htm'; } ?></textarea>
|
<textarea size="20" class="vst-textinput" name="v_proxy_ext"><?php if (!empty($v_proxy_ext)) { echo $v_proxy_ext;} else { echo 'jpg, jpeg, gif, png, ico, svg, css, zip, tgz, gz, rar, bz2, exe, pdf, doc, xls, ppt, txt, odt, ods, odp, odf, tar, bmp, rtf, js, mp3, avi, mpeg, flv, html, htm'; } ?></textarea>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -34,8 +34,8 @@
|
||||||
<table class="data-col1">
|
<table class="data-col1">
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding: 24px 0 2px 18px;">
|
<td style="padding: 24px 0 2px 18px;">
|
||||||
<a class="data-date" ?><?php echo strftime("%d %b %Y", strtotime($v_date))?></a><br>
|
<a class="data-date"><?php echo strftime("%d %b %Y", strtotime($v_date))?></a><br>
|
||||||
<a class="data-date" ?><?php echo $v_time?></a>
|
<a class="data-date"><?php echo $v_time?></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr><td style="padding: 0 0 0 18px;" class="data-<?php echo $v_status ?>"><b><?php echo __($v_status) ?></b></td></tr>
|
<tr><td style="padding: 0 0 0 18px;" class="data-<?php echo $v_status ?>"><b><?php echo __($v_status) ?></b></td></tr>
|
||||||
|
|
|
@ -54,8 +54,8 @@
|
||||||
<table class="data-col1">
|
<table class="data-col1">
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding: 24px 0 2px 18px;">
|
<td style="padding: 24px 0 2px 18px;">
|
||||||
<a class="data-date" ?><?php echo strftime("%d %b %Y", strtotime($v_date))?></a><br>
|
<a class="data-date"><?php echo strftime("%d %b %Y", strtotime($v_date))?></a><br>
|
||||||
<a class="data-date" ?><?php echo $v_time?></a>
|
<a class="data-date"><?php echo $v_time?></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr><td style="padding: 0 0 0 18px;" class="data-<?php echo $v_status ?>"><b><?php echo __($v_status) ?></b></td></tr>
|
<tr><td style="padding: 0 0 0 18px;" class="data-<?php echo $v_status ?>"><b><?php echo __($v_status) ?></b></td></tr>
|
||||||
|
@ -99,7 +99,7 @@
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="vst-text" style="padding: 10 0 0 2px;">
|
<td class="vst-text" style="padding: 10px 0 0 2px;">
|
||||||
<?php print __('Type');?>
|
<?php print __('Type');?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -109,7 +109,7 @@
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="vst-text" style="padding: 10 0 0 2px;">
|
<td class="vst-text" style="padding: 10px 0 0 2px;">
|
||||||
<?php print __('Host');?>
|
<?php print __('Host');?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -119,7 +119,7 @@
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="vst-text" style="padding: 10 0 0 2px;">
|
<td class="vst-text" style="padding: 10px 0 0 2px;">
|
||||||
<?php print __('Charset');?>
|
<?php print __('Charset');?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -33,8 +33,8 @@
|
||||||
<table class="data-col1">
|
<table class="data-col1">
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding: 24px 0 2px 18px;">
|
<td style="padding: 24px 0 2px 18px;">
|
||||||
<a class="data-date" ?><?php echo strftime("%d %b %Y", strtotime($v_date))?></a><br>
|
<a class="data-date"><?php echo strftime("%d %b %Y", strtotime($v_date))?></a><br>
|
||||||
<a class="data-date" ?><?php echo $v_time?></a>
|
<a class="data-date"><?php echo $v_time?></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr><td style="padding: 0 0 0 18px;" class="data-<?php echo $v_status ?>"><b><?php echo __($v_status) ?></b></td></tr>
|
<tr><td style="padding: 0 0 0 18px;" class="data-<?php echo $v_status ?>"><b><?php echo __($v_status) ?></b></td></tr>
|
||||||
|
|
|
@ -33,8 +33,8 @@
|
||||||
<table class="data-col1">
|
<table class="data-col1">
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding: 24px 0 2px 18px;">
|
<td style="padding: 24px 0 2px 18px;">
|
||||||
<a class="data-date" ?><?php echo strftime("%d %b %Y", strtotime($v_date))?></a><br>
|
<a class="data-date"><?php echo strftime("%d %b %Y", strtotime($v_date))?></a><br>
|
||||||
<a class="data-date" ?><?php echo $v_time?></a>
|
<a class="data-date"><?php echo $v_time?></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr><td style="padding: 0 0 0 18px;" class="data-<?php echo $v_status ?>"><b><?php echo __($v_status) ?></b></td></tr>
|
<tr><td style="padding: 0 0 0 18px;" class="data-<?php echo $v_status ?>"><b><?php echo __($v_status) ?></b></td></tr>
|
||||||
|
|
|
@ -45,8 +45,8 @@
|
||||||
<table class="data-col1">
|
<table class="data-col1">
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding: 24px 0 2px 18px;">
|
<td style="padding: 24px 0 2px 18px;">
|
||||||
<a class="data-date" ?><?php echo strftime("%d %b %Y", strtotime($v_date))?></a><br>
|
<a class="data-date"><?php echo strftime("%d %b %Y", strtotime($v_date))?></a><br>
|
||||||
<a class="data-date" ?><?php echo $v_time?></a>
|
<a class="data-date"><?php echo $v_time?></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr><td style="padding: 0 0 0 18px;" class="data-<?php echo $v_status ?>"><b><?php echo __($v_status) ?></b></td></tr>
|
<tr><td style="padding: 0 0 0 18px;" class="data-<?php echo $v_status ?>"><b><?php echo __($v_status) ?></b></td></tr>
|
||||||
|
|
|
@ -33,8 +33,8 @@
|
||||||
<table class="data-col1">
|
<table class="data-col1">
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding: 24px 0 2px 18px;">
|
<td style="padding: 24px 0 2px 18px;">
|
||||||
<a class="data-date" ?><?php echo strftime("%d %b %Y", strtotime($v_date))?></a><br>
|
<a class="data-date"><?php echo strftime("%d %b %Y", strtotime($v_date))?></a><br>
|
||||||
<a class="data-date" ?><?php echo $v_time?></a>
|
<a class="data-date"><?php echo $v_time?></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr><td style="padding: 0 0 0 18px;" class="data-<?php echo $v_status ?>"><b><?php echo __($v_status); ?></b></td></tr>
|
<tr><td style="padding: 0 0 0 18px;" class="data-<?php echo $v_status ?>"><b><?php echo __($v_status); ?></b></td></tr>
|
||||||
|
|
|
@ -54,8 +54,8 @@
|
||||||
<table class="data-col1">
|
<table class="data-col1">
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding: 24px 0 2px 18px;">
|
<td style="padding: 24px 0 2px 18px;">
|
||||||
<a class="data-date" ?><?php echo strftime("%d %b %Y", strtotime($v_date))?></a><br>
|
<a class="data-date"><?php echo strftime("%d %b %Y", strtotime($v_date))?></a><br>
|
||||||
<a class="data-date" ?><?php echo $v_time?></a>
|
<a class="data-date"><?php echo $v_time?></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr><td style="padding: 0 0 0 18px;" class="data-<?php echo $v_status ?>"><b><?php echo $v_status ?></b></td></tr>
|
<tr><td style="padding: 0 0 0 18px;" class="data-<?php echo $v_status ?>"><b><?php echo $v_status ?></b></td></tr>
|
||||||
|
|
|
@ -33,8 +33,8 @@
|
||||||
<table class="data-col1">
|
<table class="data-col1">
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding: 24px 0 2px 18px;">
|
<td style="padding: 24px 0 2px 18px;">
|
||||||
<a class="data-date" ?><?php echo strftime("%d %b %Y", strtotime($v_date))?></a><br>
|
<a class="data-date"><?php echo strftime("%d %b %Y", strtotime($v_date))?></a><br>
|
||||||
<a class="data-date" ?><?php echo $v_time?></a>
|
<a class="data-date"><?php echo $v_time?></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr><td style="padding: 0 0 0 18px;" class="data-<?php echo $v_status ?>"><b><?php echo $v_status ?></b></td></tr>
|
<tr><td style="padding: 0 0 0 18px;" class="data-<?php echo $v_status ?>"><b><?php echo $v_status ?></b></td></tr>
|
||||||
|
@ -55,24 +55,71 @@
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<input type="text" size="20" class="vst-input" name="v_package" <?php if (!empty($v_package)) echo "value=".$v_package; ?> disabled >
|
<input type="text" size="20" class="vst-input" name="v_package" <?php if (!empty($v_package)) echo "value=".$v_package; ?> disabled >
|
||||||
|
<input type="hidden" name="v_package" <?php if (!empty($v_package)) echo "value=".$v_package; ?>>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="vst-text" style="padding: 10px 0 0 2px;">
|
<td class="vst-text" style="padding: 10px 0 0 2px;">
|
||||||
<?php print __('Default Template');?>
|
<?php print __('Web Template');?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<select class="vst-list" name="v_template">
|
<select class="vst-list" name="v_web_template">
|
||||||
<?php
|
<?php
|
||||||
foreach ($templates as $key => $value) {
|
foreach ($web_templates as $key => $value) {
|
||||||
echo "\t\t\t\t<option value=\"".$value."\"";
|
echo "\t\t\t\t<option value=\"".$value."\"";
|
||||||
if ((!empty($v_template)) && ( $value == $v_template)){
|
if ((!empty($v_web_template)) && ( $value == $v_web_template)){
|
||||||
echo 'selected' ;
|
echo ' selected' ;
|
||||||
}
|
}
|
||||||
if ((!empty($v_template)) && ( $value == $_POST['v_template'])){
|
if ((!empty($v_web_template)) && ( $value == $_POST['v_web_template'])){
|
||||||
echo 'selected' ;
|
echo ' selected' ;
|
||||||
|
}
|
||||||
|
echo ">".$value."</option>\n";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="vst-text" style="padding: 10px 0 0 2px;">
|
||||||
|
<?php print __('Proxy Template');?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<select class="vst-list" name="v_proxy_template">
|
||||||
|
<?php
|
||||||
|
foreach ($proxy_templates as $key => $value) {
|
||||||
|
echo "\t\t\t\t<option value=\"".$value."\"";
|
||||||
|
if ((!empty($v_proxy_template)) && ( $value == $v_proxy_template)){
|
||||||
|
echo ' selected' ;
|
||||||
|
}
|
||||||
|
if ((!empty($v_proxy_template)) && ( $value == $_POST['v_proxy_template'])){
|
||||||
|
echo ' selected' ;
|
||||||
|
}
|
||||||
|
echo ">".$value."</option>\n";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="vst-text" style="padding: 10px 0 0 2px;">
|
||||||
|
<?php print __('DNS Template');?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<select class="vst-list" name="v_dns_template">
|
||||||
|
<?php
|
||||||
|
foreach ($dns_templates as $key => $value) {
|
||||||
|
echo "\t\t\t\t<option value=\"".$value."\"";
|
||||||
|
if ((!empty($v_dns_template)) && ( $value == $v_dns_template)){
|
||||||
|
echo ' selected' ;
|
||||||
|
}
|
||||||
|
if ((!empty($v_dns_template)) && ( $value == $_POST['v_dns_template'])){
|
||||||
|
echo ' selected' ;
|
||||||
}
|
}
|
||||||
echo ">".$value."</option>\n";
|
echo ">".$value."</option>\n";
|
||||||
}
|
}
|
||||||
|
@ -92,10 +139,10 @@
|
||||||
foreach ($shells as $key => $value) {
|
foreach ($shells as $key => $value) {
|
||||||
echo "\t\t\t\t<option value=\"".$value."\"";
|
echo "\t\t\t\t<option value=\"".$value."\"";
|
||||||
if ((!empty($v_shell)) && ( $value == $v_shell)){
|
if ((!empty($v_shell)) && ( $value == $v_shell)){
|
||||||
echo 'selected' ;
|
echo ' selected' ;
|
||||||
}
|
}
|
||||||
if ((!empty($v_shell)) && ( $value == $_POST['v_shell'])){
|
if ((!empty($v_shell)) && ( $value == $_POST['v_shell'])){
|
||||||
echo 'selected' ;
|
echo ' selected' ;
|
||||||
}
|
}
|
||||||
echo ">".$value."</option>\n";
|
echo ">".$value."</option>\n";
|
||||||
}
|
}
|
||||||
|
|
|
@ -45,8 +45,8 @@
|
||||||
<table class="data-col1">
|
<table class="data-col1">
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding: 24px 0 2px 18px;">
|
<td style="padding: 24px 0 2px 18px;">
|
||||||
<a class="data-date" ?><?php echo strftime("%d %b %Y", strtotime($v_date))?></a><br>
|
<a class="data-date"><?php echo strftime("%d %b %Y", strtotime($v_date))?></a><br>
|
||||||
<a class="data-date" ?><?php echo $v_time?></a>
|
<a class="data-date"><?php echo $v_time?></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr><td style="padding: 0 0 0 18px;" class="data-<?php echo $v_status ?>"><b><?php echo __($v_status); ?></b></td></tr>
|
<tr><td style="padding: 0 0 0 18px;" class="data-<?php echo $v_status ?>"><b><?php echo __($v_status); ?></b></td></tr>
|
||||||
|
@ -155,27 +155,6 @@
|
||||||
<input type="text" size="20" class="vst-input" name="v_lname" <?php if (!empty($v_lname)) echo "value=".$v_lname; ?>>
|
<input type="text" size="20" class="vst-input" name="v_lname" <?php if (!empty($v_lname)) echo "value=".$v_lname; ?>>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td class="vst-text" style="padding: 10px 0 0 2px;" >
|
|
||||||
<?php print __('Default Template');?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td>
|
|
||||||
<select class="vst-list" name="v_template">
|
|
||||||
<?php
|
|
||||||
foreach ($templates as $key => $value) {
|
|
||||||
echo "\n\t\t\t\t\t\t\t\t\t\t<option value=\"".$value."\"";
|
|
||||||
$svalue = "'".$value."'";
|
|
||||||
if (( $value == $v_template ) || ($svalue == $v_template )){
|
|
||||||
echo 'selected' ;
|
|
||||||
}
|
|
||||||
echo ">".$value."</option>\n";
|
|
||||||
}
|
|
||||||
?>
|
|
||||||
</select>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="vst-text" style="padding: 10px 0 0 2px;" >
|
<td class="vst-text" style="padding: 10px 0 0 2px;" >
|
||||||
<?php print __('SSH Access');?>
|
<?php print __('SSH Access');?>
|
||||||
|
|
|
@ -65,8 +65,8 @@
|
||||||
<table class="data-col1">
|
<table class="data-col1">
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding: 24px 0 2px 18px;">
|
<td style="padding: 24px 0 2px 18px;">
|
||||||
<a class="data-date" ?><?php echo strftime("%d %b %Y", strtotime($v_date))?></a><br>
|
<a class="data-date"><?php echo strftime("%d %b %Y", strtotime($v_date))?></a><br>
|
||||||
<a class="data-date" ?><?php echo $v_time?></a>
|
<a class="data-date"><?php echo $v_time?></a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr><td style="padding: 0 0 0 18px;" class="data-<?php echo $v_status ?>"><b><?php echo __($v_status) ?></b></td></tr>
|
<tr><td style="padding: 0 0 0 18px;" class="data-<?php echo $v_status ?>"><b><?php echo __($v_status) ?></b></td></tr>
|
||||||
|
@ -113,7 +113,7 @@
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="vst-text" style="padding: 10 0 0 2px;">
|
<td class="vst-text" style="padding: 10px 0 0 2px;">
|
||||||
<?php print __('Aliases');?>
|
<?php print __('Aliases');?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -124,7 +124,7 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="vst-text" style="padding: 10px 0 0 2px;">
|
<td class="vst-text" style="padding: 10px 0 0 2px;">
|
||||||
<?php print __('Template');?>
|
<?php print __('Web Template');?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
|
@ -145,25 +145,49 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="vst-text" style="padding: 10px 0 0 2px;">
|
<td class="vst-text" style="padding: 10px 0 0 2px;">
|
||||||
<?php print __('Nginx Support');?>
|
<?php print __('Proxy Support');?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<input type="checkbox" size="20" class="vst-checkbox" name="v_nginx" <?php if (!empty($v_nginx)) echo "checked=yes" ?> onclick="javascript:elementHideShow('nginxtable');">
|
<input type="checkbox" size="20" class="vst-checkbox" name="v_proxy" <?php if (!empty($v_proxy)) echo "checked=yes" ?> onclick="javascript:elementHideShow('proxytable');">
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<table style="display:<?php if (empty($v_nginx)) { echo 'none';} else {echo 'block';}?> ;" id="nginxtable">
|
<table style="display:<?php if (empty($v_proxy)) { echo 'none';} else {echo 'block';}?> ;" id="proxytable">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="vst-text" style="padding: 9px 0 0 0;">
|
<td class="vst-text" style="padding: 9px 0 0 2px;">
|
||||||
<?php print __('Nginx Extensions');?>
|
<?php print __('Proxy Template');?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<textarea size="20" class="vst-textinput" name="v_nginx_ext"><?php if (!empty($v_nginx_ext)) { echo $v_nginx_ext;} else { echo 'jpg, jpeg, gif, png, ico, svg, css, zip, tgz, gz, rar, bz2, exe, pdf, doc, xls, ppt, txt, odt, ods, odp, odf, tar, bmp, rtf, js, mp3, avi, mpeg, flv, html, htm'; } ?></textarea>
|
<select class="vst-list" name="v_proxy_template">
|
||||||
|
<?php
|
||||||
|
foreach ($proxy_templates as $key => $value) {
|
||||||
|
echo "\t\t\t\t<option value=\"".$value."\"";
|
||||||
|
$svalue = "'".$value."'";
|
||||||
|
if ((!empty($v_proxy_template)) && ( $value == $v_proxy_template ) || ($svalue == $v_proxy_template)){
|
||||||
|
echo ' selected' ;
|
||||||
|
}
|
||||||
|
if ((empty($v_proxy_template)) && ($value == 'default')){
|
||||||
|
echo ' selected' ;
|
||||||
|
}
|
||||||
|
echo ">".$value."</option>\n";
|
||||||
|
}
|
||||||
|
?>
|
||||||
|
</select>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="vst-text" style="padding: 10px 0 0 0;">
|
||||||
|
<?php print __('Proxy Extensions');?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<textarea size="20" class="vst-textinput" name="v_proxy_ext"><?php if (!empty($v_proxy_ext)) { echo $v_proxy_ext;} else { echo 'jpg, jpeg, gif, png, ico, svg, css, zip, tgz, gz, rar, bz2, exe, pdf, doc, xls, ppt, txt, odt, ods, odp, odf, tar, bmp, rtf, js, mp3, avi, mpeg, flv, html, htm'; } ?></textarea>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -64,12 +64,12 @@
|
||||||
$cron = __('no');
|
$cron = __('no');
|
||||||
$udir = __('no');
|
$udir = __('no');
|
||||||
|
|
||||||
if (!empty($data[$key]['WEB'])) $web = __('yes').' ¨';
|
if (!empty($data[$key]['WEB'])) $web = __('yes');
|
||||||
if (!empty($data[$key]['DNS'])) $dns = __('yes').' ¨';
|
if (!empty($data[$key]['DNS'])) $dns = __('yes');
|
||||||
if (!empty($data[$key]['MAIL'])) $mail = __('yes').' ¨';
|
if (!empty($data[$key]['MAIL'])) $mail = __('yes');
|
||||||
if (!empty($data[$key]['DB'])) $db = __('yes').' ¨';
|
if (!empty($data[$key]['DB'])) $db = __('yes');
|
||||||
if (!empty($data[$key]['CRON'])) $cron = __('yes').' ¨';
|
if (!empty($data[$key]['CRON'])) $cron = __('yes');
|
||||||
if (!empty($data[$key]['UDIR'])) $udir = __('yes').' ¨';
|
if (!empty($data[$key]['UDIR'])) $udir = __('yes');
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|
||||||
|
@ -114,18 +114,10 @@
|
||||||
<td style="vertical-align:top;" >
|
<td style="vertical-align:top;" >
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="counter-name" style="padding: 2px 0 0 0">
|
<td class="chart1" style="padding: 10px 0 0px 2px"><?php print __('Backup Size');?>: <?php echo humanize_usage($data[$key]['SIZE']) ?>
|
||||||
<?php echo __($data[$key]['TYPE']) ?>
|
<div style="width:160px; height:5px; font-size:0;background-color:#c7d5b3;">
|
||||||
</td>
|
<div style="width:<?php echo get_percentage($data[$key]['SIZE'],$panel[$user]['DISK_QUOTA']) ?>%; height:5px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
|
||||||
</tr>
|
</div>
|
||||||
<tr>
|
|
||||||
<td class="chart1">
|
|
||||||
<?php print __('Run Time');?>: <?php echo humanize_time($data[$key]['RUNTIME']) ?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="chart1">
|
|
||||||
<?php print __('Backup Size');?>: <?php echo humanize_usage($data[$key]['SIZE']) ?>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@ -133,32 +125,20 @@
|
||||||
<td style="vertical-align:top;" width="250">
|
<td style="vertical-align:top;" width="250">
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="counter-name" width="48">
|
<td class="counter-name">
|
||||||
<?php print __('WEB');?>:
|
<?php print __('Type');?>:
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td class="counter-value">
|
||||||
|
<?php echo $data[$key]['TYPE'] ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="counter-name">
|
||||||
|
<?php print __('Consistent');?>:
|
||||||
|
</td>
|
||||||
|
<td class="counter-value">
|
||||||
<a class="counter-value" title="<?php echo str_replace(',', ', ', $data[$key]['WEB']) ?>">
|
<a class="counter-value" title="<?php echo str_replace(',', ', ', $data[$key]['WEB']) ?>">
|
||||||
<?php echo $web ?>
|
<?php print __($web) ?>
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="counter-name" width="48">
|
|
||||||
<?php print __('DNS');?>:
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a class="counter-value" title="<?php echo str_replace(',', ', ', $data[$key]['DNS']) ?>">
|
|
||||||
<?php echo $dns ?>
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="counter-name" width="48">
|
|
||||||
<?php print __('MAIL');?>:
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a class="counter-value" title="<?php echo str_replace(',', ', ', $data[$key]['MAIL']) ?>">
|
|
||||||
<?php echo $mail ?>
|
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -167,36 +147,13 @@
|
||||||
<td rowspan=4 style="vertical-align:top;" width="300">
|
<td rowspan=4 style="vertical-align:top;" width="300">
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="counter-name" width="90">
|
<td class="counter-name">
|
||||||
<?php print __('DB');?>:
|
<?php print __('Run Time');?>:
|
||||||
</td>
|
</td>
|
||||||
<td>
|
<td class="counter-value">
|
||||||
<a class="counter-value" title="<?php echo str_replace(',', ', ', $data[$key]['DB']) ?>">
|
<?php echo humanize_time($data[$key]['RUNTIME']) ?>
|
||||||
<?php echo $db ?>
|
|
||||||
</a>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td class="counter-name" width="90">
|
|
||||||
<?php print __('CRON');?>:
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a class="counter-value" title="<?php echo $data[$key]['CRON'] ?>">
|
|
||||||
<?php echo $cron ?>
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="counter-name" width="90">
|
|
||||||
<?php print __('USER DIRS');?>:
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<a class="counter-value" title="<?php echo str_replace(',', ', ', $data[$key]['UDIR']) ?>">
|
|
||||||
<?php echo $udir ?>
|
|
||||||
</a>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -100,20 +100,15 @@
|
||||||
<td style="vertical-align:top;" >
|
<td style="vertical-align:top;" >
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="counter-name" style="padding: 2px 0 4px 2px">
|
<td class="chart1" style="padding: 10px 0 0px 2px"><?php print __('Disk');?>: <?php echo humanize_usage($data[$key]['U_DISK']) ?>
|
||||||
[<?php echo $data[$key]['TYPE'] ?>] <?php print __('database');?>
|
<div style="width:160px; height:5px; font-size:0;background-color:#c7d5b3;">
|
||||||
</td>
|
<div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$panel[$user]['DISK_QUOTA']) ?>%; height:5px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="chart1" style="padding: 0px 0 0px 2px"><?php print __('Disk');?>: <?php echo humanize_usage($data[$key]['U_DISK']) ?>
|
|
||||||
<div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;">
|
|
||||||
<div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$panel[$user]['DISK_QUOTA']) ?>%; height:6px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
|
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
<td style="vertical-align:top;" width="250">
|
<td style="vertical-align:top;" width="260">
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="counter-name">
|
<td class="counter-name">
|
||||||
|
@ -143,6 +138,14 @@
|
||||||
<?php echo $data[$key]['CHARSET'] ?>
|
<?php echo $data[$key]['CHARSET'] ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="counter-name">
|
||||||
|
<?php print __('Type');?>:
|
||||||
|
</td>
|
||||||
|
<td class="counter-value">
|
||||||
|
<?php echo $data[$key]['TYPE'] ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -103,34 +103,30 @@
|
||||||
<td class="counter-name" style="padding: 2px 0 0 2px;">
|
<td class="counter-name" style="padding: 2px 0 0 2px;">
|
||||||
<?php echo $data[$key]['IP'] ?>
|
<?php echo $data[$key]['IP'] ?>
|
||||||
</td>
|
</td>
|
||||||
<tr>
|
|
||||||
<td class="counter-name" style="padding: 0 0 20px 2px">
|
|
||||||
[<?php echo $data[$key]['TPL'] ?>] <?php print __('template');?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
<td style="vertical-align:top;" width="250">
|
<td style="vertical-align:top;" width="270">
|
||||||
<table>
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td class="counter-name"><?php print __('Template') ?>:</td>
|
||||||
|
<td class="counter-value"><?php echo $data[$key]['TPL'] ?></td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="counter-name"><?php print __('SOA') ?>:</td>
|
<td class="counter-name"><?php print __('SOA') ?>:</td>
|
||||||
<td class="counter-value"><?php echo $data[$key]['SOA'] ?></td>
|
<td class="counter-value"><?php echo $data[$key]['SOA'] ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td class="counter-name"><?php print __('TTL') ?>:</td>
|
|
||||||
<td class="counter-value"><?php echo $data[$key]['TTL'] ?></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
<td rowspan=4 style="vertical-align:top;" width="300">
|
<td rowspan=4 style="vertical-align:top;" width="300">
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="counter-name"><?php print __('Expire');?>:</td>
|
<td class="counter-name"><?php print __('TTL') ?>:</td>
|
||||||
<td class="counter-value"><?php echo strftime("%d %b %Y", strtotime($data[$key]['EXP'])) ?></td>
|
<td class="counter-value"><?php echo $data[$key]['TTL'] ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="counter-name"><?php print __('Records');?>:</td>
|
<td class="counter-name"><?php print __('Expire');?>:</td>
|
||||||
<td class="counter-value"><?php echo $data[$key]['RECORDS'] ?></td>
|
<td class="counter-value"><?php echo strftime("%d %b %Y", strtotime($data[$key]['EXP'])) ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -109,21 +109,16 @@
|
||||||
<td style="vertical-align:top;" >
|
<td style="vertical-align:top;" >
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="counter-name" style="padding: 2px 0 2px 0">
|
<td class="chart1" style="padding: 10px 0 2px 0">
|
||||||
<?php print __('Catchall email');?> > <?php echo $data[$key]['CATCHALL'] ?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="chart1">
|
|
||||||
<?php print __('Disk');?>: <?php echo humanize_usage($data[$key]['U_DISK']) ?>
|
<?php print __('Disk');?>: <?php echo humanize_usage($data[$key]['U_DISK']) ?>
|
||||||
<div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;">
|
<div style="width:160px; height:5px; font-size:0;background-color:#c7d5b3;">
|
||||||
<div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$panel[$user]['DISK_QUOTA']) ?>%; height:6px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
|
<div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$panel[$user]['DISK_QUOTA']) ?>%; height:5px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
<td style="vertical-align:top;" width="250">
|
<td style="vertical-align:top;" width="260">
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="counter-name">
|
<td class="counter-name">
|
||||||
|
@ -155,10 +150,10 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="counter-name">
|
<td class="counter-name">
|
||||||
<?php print __('Accounts');?>:
|
<?php print __('Catchall email');?>:
|
||||||
</td>
|
</td>
|
||||||
<td class="counter-value">
|
<td class="counter-value">
|
||||||
<?php echo $data[$key]['ACCOUNTS'] ?>
|
<?php echo $data[$key]['CATCHALL'] ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -97,10 +97,10 @@
|
||||||
<td class="counter-name" style="padding: 4px 0 0 0;">
|
<td class="counter-name" style="padding: 4px 0 0 0;">
|
||||||
</td>
|
</td>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="chart1" style="padding: 0 0 2px 0">
|
<td class="chart1" style="padding: 2px 0 2px 0">
|
||||||
<?php print __('Disk');?>: <?php echo humanize_usage($data[$key]['U_DISK']) ?>
|
<?php print __('Disk');?>: <?php echo humanize_usage($data[$key]['U_DISK']) ?>
|
||||||
<div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;">
|
<div style="width:160px; height:5px; font-size:0;background-color:#c7d5b3;">
|
||||||
<div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$data[$key]['QUOTA']) ?>%; height:6px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
|
<div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$data[$key]['QUOTA']) ?>%; height:5px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -69,34 +69,30 @@
|
||||||
<td style="vertical-align:top;" >
|
<td style="vertical-align:top;" >
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="counter-name" style="padding: 4px 0px 0px 0;" >
|
<td class="counter-name"><?php print __('Web Template');?>:</td>
|
||||||
<?php print __('Template');?>:
|
<td class="counter-value"><?php echo $data[$key]['WEB_TEMPLATE'] ?> </td>
|
||||||
</td>
|
|
||||||
<td class="counter-value" style="padding: 4px 0 0 6px;">
|
|
||||||
<?php echo $data[$key]['TEMPLATE'] ?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="counter-name" style="padding: 0px 0px 6px 0;">
|
<td class="counter-name"><?php print __('Proxy Template');?>:</td>
|
||||||
<?php print __('SSH Access');?>:
|
<td class="counter-value"><?php echo $data[$key]['PROXY_TEMPLATE'] ?> </td>
|
||||||
</td>
|
|
||||||
<td class="counter-value" width="58px">
|
|
||||||
<?php echo $data[$key]['SHELL'] ?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="chart1" colspan=2 style="padding: 0 0 0 2px;">
|
<td class="counter-name"><?php print __('DNS Template');?>:</td>
|
||||||
|
<td class="counter-value"><?php echo $data[$key]['DNS_TEMPLATE'] ?> </td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="chart1" colspan=2 style="padding: 8px 0 0 2px;">
|
||||||
<?php print __('Bandwidth');?>: <?php echo humanize_usage($data[$key]['BANDWIDTH']) ?>
|
<?php print __('Bandwidth');?>: <?php echo humanize_usage($data[$key]['BANDWIDTH']) ?>
|
||||||
<div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;">
|
<div style="width:160px; height:5px; font-size:0;background-color:#c7d5b3;">
|
||||||
<div style="width:0%; height:6px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
|
<div style="width:0%; height:5px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="chart1" colspan=2 style="padding: 0 0 0 2px;">
|
<td class="chart1" colspan=2 style="padding: 0 0 0 2px;">
|
||||||
<?php print __('Disk');?>: <?php echo humanize_usage($data[$key]['DISK_QUOTA']) ?>
|
<?php print __('Disk');?>: <?php echo humanize_usage($data[$key]['DISK_QUOTA']) ?>
|
||||||
<div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;">
|
<div style="width:160px; height:5px; font-size:0;background-color:#c7d5b3;">
|
||||||
<div style="width:0%; height:6px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
|
<div style="width:0%; height:5px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -105,88 +101,51 @@
|
||||||
<td style="vertical-align:top;" width="300">
|
<td style="vertical-align:top;" width="300">
|
||||||
<table width="300">
|
<table width="300">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="counter-name" width="37%">
|
<td class="counter-name" width="37%"><?php print __('Web Domains');?>:</td>
|
||||||
<?php print __('Web Domains');?>:
|
<td class="counter-value"><?php echo $data[$key]['WEB_DOMAINS'] ?> </td>
|
||||||
</td>
|
|
||||||
<td class="counter-value">
|
|
||||||
<?php echo $data[$key]['WEB_DOMAINS'] ?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="counter-name">
|
<td class="counter-name"><?php print __('Web Aliases');?>:</td>
|
||||||
<?php print __('Web Aliases');?>:
|
<td class="counter-value"><?php echo $data[$key]['WEB_ALIASES'] ?> <?php print __('per domain');?> </td>
|
||||||
</td>
|
|
||||||
<td class="counter-value">
|
|
||||||
<?php echo $data[$key]['WEB_ALIASES'] ?> <?php print __('per domain');?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="counter-name">
|
<td class="counter-name"><?php print __('DNS domains');?>:</td>
|
||||||
<?php print __('DNS domains');?>:
|
<td class="counter-value"><?php echo $data[$key]['DNS_DOMAINS'] ?> </td>
|
||||||
</td>
|
|
||||||
<td class="counter-value">
|
|
||||||
<?php echo $data[$key]['DNS_DOMAINS'] ?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="counter-name">
|
<td class="counter-name"><?php print __('DNS records');?>:</td>
|
||||||
<?php print __('DNS records');?>:
|
<td class="counter-value"><?php echo $data[$key]['DNS_RECORDS'] ?> <?php print __('per domain');?> </td>
|
||||||
</td>
|
|
||||||
<td class="counter-value">
|
|
||||||
<?php echo $data[$key]['DNS_RECORDS'] ?> <?php print __('per domain');?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="counter-name">
|
<td class="counter-name"><?php print __('Name Servers');?>:</td>
|
||||||
<?php print __('Name Servers');?>:
|
<td class="counter-value"><?php echo str_replace(',', ', ',$data[$key]['NS']) ?> </td>
|
||||||
</td>
|
|
||||||
<td class="counter-value">
|
|
||||||
<?php echo str_replace(',', ', ',$data[$key]['NS']) ?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
<td style="vertical-align:top;" width="280">
|
<td style="vertical-align:top;" width="280">
|
||||||
<table class="data-col4" width="280">
|
<table class="data-col4" width="280">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="counter-name" width="48%">
|
<td class="counter-name" width="48%"><?php print __('Mail Domains');?>:</td>
|
||||||
<?php print __('Mail Domains');?>:
|
<td class="counter-value"><?php echo $data[$key]['MAIL_DOMAINS'] ?> </td>
|
||||||
</td>
|
|
||||||
<td class="counter-value">
|
|
||||||
<?php echo $data[$key]['MAIL_DOMAINS'] ?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="counter-name">
|
<td class="counter-name"><?php print __('Mail Accounts');?>:</td>
|
||||||
<?php print __('Mail Accounts');?>:
|
<td class="counter-value"><?php echo $data[$key]['MAIL_ACCOUNTS'] ?> <?php print __('per domain');?> </td>
|
||||||
</td>
|
|
||||||
<td class="counter-value">
|
|
||||||
<?php echo $data[$key]['MAIL_ACCOUNTS'] ?> <?php print __('per domain');?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="counter-name">
|
<td class="counter-name"><?php print __('Databases');?>:</td>
|
||||||
<?php print __('Databases');?>:
|
<td class="counter-value"><?php echo $data[$key]['DATABASES'] ?> </td>
|
||||||
</td>
|
|
||||||
<td class="counter-value">
|
|
||||||
<?php echo $data[$key]['DATABASES'] ?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="counter-name">
|
<td class="counter-name"><?php print __('Cron Jobs');?>:</td>
|
||||||
<?php print __('Cron Jobs');?>:
|
<td class="counter-value"><?php echo $data[$key]['CRON_JOBS'] ?> </td>
|
||||||
</td>
|
</tr>
|
||||||
<td class="counter-value">
|
<td class="counter-name"><?php print __('SSH Access');?>:</td>
|
||||||
<?php echo $data[$key]['CRON_JOBS'] ?>
|
<td class="counter-value"><?php echo $data[$key]['SHELL'] ?></td>
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="counter-name">
|
<td class="counter-name"><?php print __('Backups');?>:</td>
|
||||||
<?php print __('Backups');?>:
|
<td class="counter-value"><?php echo $data[$key]['BACKUPS'] ?></td>
|
||||||
</td>
|
|
||||||
<td class="counter-value">
|
|
||||||
<?php echo $data[$key]['BACKUPS'] ?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -1,10 +1,15 @@
|
||||||
<table class="submenu">
|
<table class="submenu">
|
||||||
<tr>
|
<tr>
|
||||||
<td style="padding: 2px 0 0 6px">
|
<td style="padding: 2px 0 0 6px">
|
||||||
<div class="submenu-button-block">
|
<div class="submenu-search-block">
|
||||||
|
<form action="/search/" method="get">
|
||||||
|
<input type="text" name="q" class="submenu-search-field">
|
||||||
|
<input type="submit" value="<?php print __('Search');?>" class="submenu-button" style="width: 96px;">
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
<div class="submenu-select-block" style="padding-left:8px;">
|
||||||
<form action="/list/stats/" method="get" id="objects">
|
<form action="/list/stats/" method="get" id="objects">
|
||||||
<a class="vst<?php if (empty($_GET['user'])) echo "-selected"; ?>" href='/list/stats/'><?php print __('Overall Statistics');?></a>
|
<a class="vst<?php if (empty($_GET['user'])) echo "-selected"; ?>" style="padding: 0 12px 0 0;" href='/list/stats/'><?php print __('Overall Statistics');?></a>
|
||||||
<div class="submenu-select-block">
|
|
||||||
<select class="submenu-select-dropdown" name="user">
|
<select class="submenu-select-dropdown" name="user">
|
||||||
<option value=""><?php print __('show per user');?></option>
|
<option value=""><?php print __('show per user');?></option>
|
||||||
<?php
|
<?php
|
||||||
|
@ -17,18 +22,9 @@
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
</select>
|
</select>
|
||||||
|
<input type="submit" name="ok" value="›" class="submenu-button" style="width: 36px;">
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<input type="submit" name="list" value="›" class="button" style="width: 37px;font-size: 12px; height: 24px;">
|
|
||||||
</form>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
<div class="submenu-search-block">
|
|
||||||
<form action="/search/" method="get">
|
|
||||||
<input type="text" name="q" class="submenu-search-field">
|
|
||||||
<input type="submit" value="<?php print __('Search');?>" class="submenu-button" style="width: 96px;">
|
|
||||||
</form>
|
|
||||||
</div>
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@ -62,23 +58,18 @@
|
||||||
<td style="vertical-align:top;" >
|
<td style="vertical-align:top;" >
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan=2 class="counter-name" style="padding: 2px 0px 6px 2px;">
|
<td class="chart1" colspan=2 style="padding: 4px 0 0 2px;">
|
||||||
[<?php echo $data[$key]['PACKAGE']?>] <?php print __('package');?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="chart1" colspan=2 style="padding: 0 0 0 2px;">
|
|
||||||
<?php print __('Bandwidth');?>: <?php echo get_percentage($data[$key]['U_BANDWIDTH'],$data[$key]['BANDWIDTH']) ?>% (<?php echo humanize_usage($data[$key]['U_BANDWIDTH']) ?>)
|
<?php print __('Bandwidth');?>: <?php echo get_percentage($data[$key]['U_BANDWIDTH'],$data[$key]['BANDWIDTH']) ?>% (<?php echo humanize_usage($data[$key]['U_BANDWIDTH']) ?>)
|
||||||
<div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;">
|
<div style="width:160px; height:7px; font-size:0;background-color:#c7d5b3;">
|
||||||
<div style="width:<?php echo get_percentage($data[$key]['U_BANDWIDTH'],$data[$key]['BANDWIDTH']) ?>%; height:6px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
|
<div style="width:<?php echo get_percentage($data[$key]['U_BANDWIDTH'],$data[$key]['BANDWIDTH']) ?>%; height:7px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="chart1" colspan=2 style="padding: 0 0 0 2px;">
|
<td class="chart1" colspan=2 style="padding: 0 0 0 2px;">
|
||||||
<?php print __('Disk');?>: <?php echo get_percentage($data[$key]['U_DISK'],$data[$key]['DISK_QUOTA']) ?>% (<?php echo humanize_usage($data[$key]['U_DISK']) ?>)
|
<?php print __('Disk');?>: <?php echo get_percentage($data[$key]['U_DISK'],$data[$key]['DISK_QUOTA']) ?>% (<?php echo humanize_usage($data[$key]['U_DISK']) ?>)
|
||||||
<div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;">
|
<div style="width:160px; height:7px; font-size:0;background-color:#c7d5b3;">
|
||||||
<div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$data[$key]['DISK_QUOTA']) ?>%; height:6px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
|
<div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$data[$key]['DISK_QUOTA']) ?>%; height:7px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -87,12 +78,18 @@
|
||||||
<table class="chart2">
|
<table class="chart2">
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<?php print __('Web');?>: <?php echo humanize_usage($data[$key]['U_DISK_WEB'])?><br>
|
<?php print __('Web');?>: <?php echo humanize_usage($data[$key]['U_DISK_WEB'])?>
|
||||||
<?php print __('Mail');?>: <?php echo humanize_usage($data[$key]['U_DISK_MAIL'])?><br>
|
|
||||||
</td>
|
</td>
|
||||||
<td style="padding: 0px 10px 0px 8px">
|
<td style="padding: 0px 0px 0px 4px">
|
||||||
<?php print __('Databases');?>: <?php echo humanize_usage($data[$key]['U_DISK_DB'])?><br>
|
<?php print __('Databases');?>: <?php echo humanize_usage($data[$key]['U_DISK_DB'])?>
|
||||||
<?php print __('User Directories');?>: <?php echo humanize_usage($data[$key]['U_DISK_DIRS'])?><br>
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<?php print __('Mail');?>: <?php echo humanize_usage($data[$key]['U_DISK_MAIL'])?>
|
||||||
|
</td>
|
||||||
|
<td style="padding: 0px 0px 0px 4px">
|
||||||
|
<?php print __('User Directories');?>: <?php echo humanize_usage($data[$key]['U_DISK_DIRS'])?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -138,35 +138,42 @@
|
||||||
<td colspan=3 class="username" style="padding: 0 0 0 4px;"><b><?php echo $key ?></b><a class="fullname"><?php echo $data[$key]['FNAME']?> <?php echo $data[$key]['LNAME']?></a></td>
|
<td colspan=3 class="username" style="padding: 0 0 0 4px;"><b><?php echo $key ?></b><a class="fullname"><?php echo $data[$key]['FNAME']?> <?php echo $data[$key]['LNAME']?></a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="vertical-align:top;" width="240">
|
<td style="vertical-align:top;" width="260">
|
||||||
<table>
|
<table>
|
||||||
<tr><td colspan=2 class="counter-name" style="padding: 2px 0 0 2px;"><?php echo $data[$key]['CONTACT']?></td></tr>
|
<tr><td colspan=2 class="counter-name" style="padding: 2px 0 0 2px;"><?php echo $data[$key]['CONTACT']?></td></tr>
|
||||||
<tr><td colspan=2 class="counter-name" style="padding: 0 0 18px 2px;">[<?php echo $data[$key]['PACKAGE']?>] <?php print __('package');?></td></tr>
|
<tr><td colspan=2 class="counter-name" style="padding: 0 0 8px 2px;">[<?php echo $data[$key]['PACKAGE']?>] <?php print __('package');?></td></tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="chart1" colspan=2 style="padding: 0 0 0 3px;"><?php print __('Bandwidth');?>: <?php echo get_percentage($data[$key]['U_BANDWIDTH'],$data[$key]['BANDWIDTH']) ?>% (<?php echo humanize_usage($data[$key]['U_BANDWIDTH']) ?>)
|
<td class="chart1" colspan=2 style="padding: 0 0 0 3px;"><?php print __('Bandwidth');?>: <?php echo get_percentage($data[$key]['U_BANDWIDTH'],$data[$key]['BANDWIDTH']) ?>% (<?php echo humanize_usage($data[$key]['U_BANDWIDTH']) ?>)
|
||||||
<div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;">
|
<div style="width:160px; height:7px; font-size:0;background-color:#c7d5b3;">
|
||||||
<div style="width:<?php echo get_percentage($data[$key]['U_BANDWIDTH'],$data[$key]['BANDWIDTH']) ?>%; height:6px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
|
<div style="width:<?php echo get_percentage($data[$key]['U_BANDWIDTH'],$data[$key]['BANDWIDTH']) ?>%; height:7px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="chart1" colspan=2 style="padding: 0 0 0 3px;"><?php print __('Disk');?>: <?php echo get_percentage($data[$key]['U_DISK'],$data[$key]['DISK_QUOTA']) ?>% (<?php echo humanize_usage($data[$key]['U_DISK']) ?>)
|
<td class="chart1" colspan=2 style="padding: 0 0 0 3px;"><?php print __('Disk');?>: <?php echo get_percentage($data[$key]['U_DISK'],$data[$key]['DISK_QUOTA']) ?>% (<?php echo humanize_usage($data[$key]['U_DISK']) ?>)
|
||||||
<div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;">
|
<div style="width:160px; height:7px; font-size:0;background-color:#c7d5b3;">
|
||||||
<div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$data[$key]['DISK_QUOTA']) ?>%; height:6px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
|
<div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$data[$key]['DISK_QUOTA']) ?>%; height:7px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan=2>
|
<td colspan=2 style="padding: 2px 0 0 0;">
|
||||||
<table class="chart2">
|
<table class="chart2">
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<?php print __('Web');?>: <?php echo humanize_usage($data[$key]['U_DISK_WEB'])?><br>
|
<?php print __('Web');?>: <?php echo humanize_usage($data[$key]['U_DISK_WEB'])?>
|
||||||
<?php print __('Mail');?>: <?php echo humanize_usage($data[$key]['U_DISK_MAIL'])?><br>
|
|
||||||
</td>
|
</td>
|
||||||
<td style="padding: 0px 10px 0px 8px">
|
<td style="padding: 0px 0px 0px 4px">
|
||||||
<?php print __('Databases');?>: <?php echo humanize_usage($data[$key]['U_DISK_DB'])?><br>
|
<?php print __('Databases');?>: <?php echo humanize_usage($data[$key]['U_DISK_DB'])?>
|
||||||
<?php print __('User Directories');?>: <?php echo humanize_usage($data[$key]['U_DISK_DIRS'])?><br>
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<?php print __('Mail');?>: <?php echo humanize_usage($data[$key]['U_DISK_MAIL'])?>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td style="padding: 0px 0px 0px 4px">
|
||||||
|
<?php print __('User Directories');?>: <?php echo humanize_usage($data[$key]['U_DISK_DIRS'])?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@ -174,12 +181,8 @@
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
<td style="vertical-align:top;" width="320">
|
<td style="vertical-align:top;" width="300">
|
||||||
<table width="300">
|
<table width="290">
|
||||||
<tr>
|
|
||||||
<td class="counter-name" width="36%"><?php print __('Template');?>:</td>
|
|
||||||
<td class="counter-value"><?php echo $data[$key]['TEMPLATE'] ?></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="counter-name"><?php print __('Web Domains');?>:</td>
|
<td class="counter-name"><?php print __('Web Domains');?>:</td>
|
||||||
<td class="counter-value"><?php echo $data[$key]['U_WEB_DOMAINS'] ?> / <?php echo $data[$key]['WEB_DOMAINS'] ?></td>
|
<td class="counter-value"><?php echo $data[$key]['U_WEB_DOMAINS'] ?> / <?php echo $data[$key]['WEB_DOMAINS'] ?></td>
|
||||||
|
|
|
@ -59,19 +59,19 @@
|
||||||
if (!empty($data[$key]['FTP_USER'])) {
|
if (!empty($data[$key]['FTP_USER'])) {
|
||||||
$ftp_user=$data[$key]['FTP_USER'];
|
$ftp_user=$data[$key]['FTP_USER'];
|
||||||
}
|
}
|
||||||
$nginx_support='no';
|
$proxy_support='no';
|
||||||
if (!empty($data[$key]['NGINX'])) {
|
if (!empty($data[$key]['PROXY'])) {
|
||||||
$nginx_support='yes';
|
$proxy_support='yes';
|
||||||
}
|
}
|
||||||
if (strlen($data[$key]['NGINX_EXT']) > 16 ) {
|
if (strlen($data[$key]['PROXY_EXT']) > 16 ) {
|
||||||
$nginx_ext_title = str_replace(',', ', ', $data[$key]['NGINX_EXT']);
|
$proxy_ext_title = str_replace(',', ', ', $data[$key]['PROXY_EXT']);
|
||||||
$nginx_ext = substr($data[$key]['NGINX_EXT'], 0, 16);
|
$proxy_ext = substr($data[$key]['PROXY_EXT'], 0, 16);
|
||||||
$nginx_ext = trim($nginx_ext, ",");
|
$proxy_ext = trim($proxy_ext, ",");
|
||||||
$nginx_ext = str_replace(',', ', ', $nginx_ext);
|
$proxy_ext = str_replace(',', ', ', $proxy_ext);
|
||||||
$nginx_ext = $nginx_ext.", ...";
|
$proxy_ext = $proxy_ext.", ...";
|
||||||
} else {
|
} else {
|
||||||
$nginx_ext_title = '';
|
$proxy_ext_title = '';
|
||||||
$nginx_ext = str_replace(',', ', ', $data[$key]['NGINX_EXT']);
|
$proxy_ext = str_replace(',', ', ', $data[$key]['PROXY_EXT']);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
<tr class="data-row">
|
<tr class="data-row">
|
||||||
|
@ -135,53 +135,60 @@
|
||||||
<?php echo $data[$key]['IP'] ?>
|
<?php echo $data[$key]['IP'] ?>
|
||||||
</td>
|
</td>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="counter-name" style="padding: 0 0 8px 2px">
|
|
||||||
[<?php echo $data[$key]['TPL'] ?>] <?php print __('template');?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="chart1" style="padding: 0 0 0 2px">
|
<td class="chart1" style="padding: 2px 0 0 2px">
|
||||||
<?php print __('Bandwidth');?>: <?php echo humanize_usage($data[$key]['U_BANDWIDTH']) ?>
|
<?php print __('Bandwidth');?>: <?php echo humanize_usage($data[$key]['U_BANDWIDTH']) ?>
|
||||||
<div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;">
|
<div style="width:160px; height:5px; font-size:0;background-color:#c7d5b3;">
|
||||||
<div style="width:<?php echo get_percentage($data[$key]['U_BANDWIDTH'],$panel[$user]['BANDWIDTH']) ?>%; height:6px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
|
<div style="width:<?php echo get_percentage($data[$key]['U_BANDWIDTH'],$panel[$user]['BANDWIDTH']) ?>%; height:5px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="chart1" style="padding: 0 0 0 2px"><?php print __('Disk');?>: <?php echo humanize_usage($data[$key]['U_DISK']) ?>
|
<td class="chart1" style="padding: 0 0 0 2px"><?php print __('Disk');?>: <?php echo humanize_usage($data[$key]['U_DISK']) ?>
|
||||||
<div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;">
|
<div style="width:160px; height:5px; font-size:0;background-color:#c7d5b3;">
|
||||||
<div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$panel[$user]['DISK_QUOTA']) ?>%; height:6px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
|
<div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$panel[$user]['DISK_QUOTA']) ?>%; height:5px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
<td style="vertical-align:top;" width="300">
|
<td style="vertical-align:top;" width="260">
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="counter-name" width="110"><?php print __('SSL Support');?>:</td>
|
<td class="counter-name"><?php print __('Web Template');?>:</td>
|
||||||
<td class="counter-value"><?php print __($data[$key]['SSL']) ?></td>
|
<td class="counter-value"><?php print __($data[$key]['TPL']) ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="counter-name"><?php print __('SSL Support');?>:</td>
|
||||||
|
<td class="counter-value"><?php print $data[$key]['SSL'] ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="counter-name"><?php print __('SSL Home Directory');?>:</td>
|
<td class="counter-name"><?php print __('SSL Home Directory');?>:</td>
|
||||||
<td class="counter-value"><?php echo $ssl_home ?></td>
|
<td class="counter-value"><?php print $ssl_home ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td class="counter-name"><?php print __('Nginx Support');?>:</td>
|
|
||||||
<td class="counter-value"><?php print __($nginx_support) ?></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="counter-name"><?php print __('Nginx Extentions');?>:</td>
|
|
||||||
<td class="counter-value" <?php if (!empty($nginx_ext_title)) echo "title='".$nginx_ext_title."'" ?>><?php echo $nginx_ext ?></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
<td rowspan=4 style="vertical-align:top;" width="240">
|
|
||||||
<table>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="counter-name"><?php print __('Web Statistics');?>: </td>
|
<td class="counter-name"><?php print __('Web Statistics');?>: </td>
|
||||||
<td class="counter-value"> <?php print __($web_stats) ?></td>
|
<td class="counter-value"> <?php print __($web_stats) ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
<td rowspan=4 style="vertical-align:top;" width="300">
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td class="counter-name"><?php print __('Proxy Support');?>:</td>
|
||||||
|
<td class="counter-value"><?php print __($proxy_support);?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="counter-name"><?php print __('Proxy Template');?>:</td>
|
||||||
|
<td class="counter-value"><?php echo $data[$key]['PROXY'];?></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="counter-name"><?php print __('Proxy Extentions');?>:</td>
|
||||||
|
<td class="counter-value" <?php if (!empty($proxy_ext_title)) echo "title='".$proxy_ext_title."'" ?>><?php echo $proxy_ext ?></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="counter-name"> <?php print __('Additional FTP Account');?>:</td>
|
<td class="counter-name"> <?php print __('Additional FTP Account');?>:</td>
|
||||||
<td class="counter-value"> <?php print __($ftp_user) ?></td>
|
<td class="counter-value"> <?php print __($ftp_user) ?></td>
|
||||||
|
|
|
@ -86,6 +86,11 @@
|
||||||
color: #174f82;
|
color: #174f82;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.top-selected-link:active {
|
||||||
|
color: #fff;
|
||||||
|
background-color: #f79b44;
|
||||||
|
}
|
||||||
|
|
||||||
.top-user {
|
.top-user {
|
||||||
padding: 0 2px 0 0;
|
padding: 0 2px 0 0;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
|
@ -131,7 +136,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-lnk:active {
|
.nav-lnk:active {
|
||||||
color: #ccc;
|
color: #f79b44;
|
||||||
}
|
}
|
||||||
|
|
||||||
.nav-block {
|
.nav-block {
|
||||||
|
@ -165,6 +170,10 @@
|
||||||
border-bottom: 4px solid #f79b44;
|
border-bottom: 4px solid #f79b44;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.nav-selected-block:active {
|
||||||
|
color: #f79b44;
|
||||||
|
}
|
||||||
|
|
||||||
.nav-header {
|
.nav-header {
|
||||||
padding: 14px 0 0 6px;
|
padding: 14px 0 0 6px;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
|
@ -556,10 +565,12 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.counter-name {
|
.counter-name {
|
||||||
|
white-space: nowrap;
|
||||||
vertical-align:top;
|
vertical-align:top;
|
||||||
line-height: 1.2em;
|
line-height: 1.3em;
|
||||||
font-size: 10pt;
|
font-size: 10pt;
|
||||||
color: #505050;
|
color: #505050;
|
||||||
|
padding: 0 4px 0 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.cron-counter-name {
|
.cron-counter-name {
|
||||||
|
@ -902,8 +913,8 @@
|
||||||
top: 2px;
|
top: 2px;
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
<link rel="stylesheet" type="text/css" href="/css/ie.css" />
|
||||||
<![endif]-->
|
<![endif]-->
|
||||||
|
|
||||||
<link type="text/css" href="/css/jquery-custom-dialogs.css" rel="stylesheet" />
|
<link type="text/css" href="/css/jquery-custom-dialogs.css" rel="stylesheet" />
|
||||||
<script type="text/javascript" src="/js/events.js"></script>
|
<script type="text/javascript" src="/js/events.js"></script>
|
||||||
<script type="text/javascript" src="/js/jquery-1.7.2.min.js"></script>
|
<script type="text/javascript" src="/js/jquery-1.7.2.min.js"></script>
|
||||||
|
|
|
@ -143,7 +143,7 @@
|
||||||
</table>
|
</table>
|
||||||
<table class="data-col2" width="600px" style="display:<?php if (empty($v_adv)) echo 'none';?> ;" id="advtable">
|
<table class="data-col2" width="600px" style="display:<?php if (empty($v_adv)) echo 'none';?> ;" id="advtable">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="vst-text" style="padding: 10 0 0 2px;">
|
<td class="vst-text" style="padding: 10px 0 0 2px;">
|
||||||
<?php print __('Aliases');?>
|
<?php print __('Aliases');?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -154,25 +154,25 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="vst-text" style="padding: 10px 0 0 2px;">
|
<td class="vst-text" style="padding: 10px 0 0 2px;">
|
||||||
<?php print __('Nginx Support');?>
|
<?php print __('Proxy Support');?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<input type="checkbox" size="20" class="vst-checkbox" name="v_nginx" <?php if ($v_nginx !== 'off') echo "checked=yes" ?> onclick="javascript:elementHideShow('nginxtable');">
|
<input type="checkbox" size="20" class="vst-checkbox" name="v_proxy" <?php if ($v_proxy !== 'off') echo "checked=yes" ?> onclick="javascript:elementHideShow('proxytable');">
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<table style="display:<?php if ($v_nginx == 'off') { echo 'none';} else {echo 'block';}?>;" id="nginxtable" >
|
<table style="display:<?php if ($v_proxy == 'off') { echo 'none';} else {echo 'block';}?>;" id="proxytable" >
|
||||||
<tr>
|
<tr>
|
||||||
<td class="vst-text" style="padding: 9px 0 0 0;">
|
<td class="vst-text" style="padding: 9px 0 0 0;">
|
||||||
<?php print __('Nginx Extentions');?>
|
<?php print __('Proxy Extentions');?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<textarea size="20" class="vst-textinput" name="v_nginx_ext"><?php if (!empty($v_nginx_ext)) { echo $v_nginx_ext;} else { echo 'jpg, jpeg, gif, png, ico, svg, css, zip, tgz, gz, rar, bz2, exe, pdf, doc, xls, ppt, txt, odt, ods, odp, odf, tar, bmp, rtf, js, mp3, avi, mpeg, flv, html, htm'; } ?></textarea>
|
<textarea size="20" class="vst-textinput" name="v_proxy_ext"><?php if (!empty($v_proxy_ext)) { echo $v_proxy_ext;} else { echo 'jpg, jpeg, gif, png, ico, svg, css, zip, tgz, gz, rar, bz2, exe, pdf, doc, xls, ppt, txt, odt, ods, odp, odf, tar, bmp, rtf, js, mp3, avi, mpeg, flv, html, htm'; } ?></textarea>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -113,7 +113,7 @@
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="vst-text" style="padding: 10 0 0 2px;">
|
<td class="vst-text" style="padding: 10px 0 0 2px;">
|
||||||
<?php print __('Aliases');?>
|
<?php print __('Aliases');?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -124,25 +124,25 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="vst-text" style="padding: 10px 0 0 2px;">
|
<td class="vst-text" style="padding: 10px 0 0 2px;">
|
||||||
<?php print __('Nginx Support');?>
|
<?php print __('Proxy Support');?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<input type="checkbox" size="20" class="vst-checkbox" name="v_nginx" <?php if (!empty($v_nginx)) echo "checked=yes" ?> onclick="javascript:elementHideShow('nginxtable');">
|
<input type="checkbox" size="20" class="vst-checkbox" name="v_proxy" <?php if (!empty($v_proxy)) echo "checked=yes" ?> onclick="javascript:elementHideShow('proxytable');">
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<table style="display:<?php if (empty($v_nginx)) { echo 'none';} else {echo 'block';}?> ;" id="nginxtable">
|
<table style="display:<?php if (empty($v_proxy)) { echo 'none';} else {echo 'block';}?> ;" id="proxytable">
|
||||||
<tr>
|
<tr>
|
||||||
<td class="vst-text" style="padding: 9px 0 0 0;">
|
<td class="vst-text" style="padding: 9px 0 0 0;">
|
||||||
<?php print __('Nginx Extensions');?>
|
<?php print __('Proxy Extensions');?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<textarea size="20" class="vst-textinput" name="v_nginx_ext"><?php if (!empty($v_nginx_ext)) { echo $v_nginx_ext;} else { echo 'jpg, jpeg, gif, png, ico, svg, css, zip, tgz, gz, rar, bz2, exe, pdf, doc, xls, ppt, txt, odt, ods, odp, odf, tar, bmp, rtf, js, mp3, avi, mpeg, flv, html, htm'; } ?></textarea>
|
<textarea size="20" class="vst-textinput" name="v_proxy_ext"><?php if (!empty($v_proxy_ext)) { echo $v_proxy_ext;} else { echo 'jpg, jpeg, gif, png, ico, svg, css, zip, tgz, gz, rar, bz2, exe, pdf, doc, xls, ppt, txt, odt, ods, odp, odf, tar, bmp, rtf, js, mp3, avi, mpeg, flv, html, htm'; } ?></textarea>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -86,20 +86,15 @@
|
||||||
<td style="vertical-align:top;" >
|
<td style="vertical-align:top;" >
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="counter-name" style="padding: 2px 0 4px 2px">
|
<td class="chart1" style="padding: 10px 0 0px 2px"><?php print __('Disk');?>: <?php echo humanize_usage($data[$key]['U_DISK']) ?>
|
||||||
[<?php echo $data[$key]['TYPE'] ?>] <?php print __('database');?>
|
<div style="width:160px; height:5px; font-size:0;background-color:#c7d5b3;">
|
||||||
</td>
|
<div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$panel[$user]['DISK_QUOTA']) ?>%; height:5px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="chart1" style="padding: 0px 0 0px 2px"><?php print __('Disk');?>: <?php echo humanize_usage($data[$key]['U_DISK']) ?>
|
|
||||||
<div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;">
|
|
||||||
<div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$panel[$user]['DISK_QUOTA']) ?>%; height:6px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
|
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
<td style="vertical-align:top;" width="250">
|
<td style="vertical-align:top;" width="260">
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="counter-name">
|
<td class="counter-name">
|
||||||
|
@ -129,6 +124,14 @@
|
||||||
<?php echo $data[$key]['CHARSET'] ?>
|
<?php echo $data[$key]['CHARSET'] ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="counter-name">
|
||||||
|
<?php print __('Type');?>:
|
||||||
|
</td>
|
||||||
|
<td class="counter-value">
|
||||||
|
<?php echo $data[$key]['TYPE'] ?>
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -89,34 +89,30 @@
|
||||||
<td class="counter-name" style="padding: 2px 0 0 2px;">
|
<td class="counter-name" style="padding: 2px 0 0 2px;">
|
||||||
<?php echo $data[$key]['IP'] ?>
|
<?php echo $data[$key]['IP'] ?>
|
||||||
</td>
|
</td>
|
||||||
<tr>
|
|
||||||
<td class="counter-name" style="padding: 0 0 20px 2px">
|
|
||||||
[<?php echo $data[$key]['TPL'] ?>] <?php print __('template');?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
<td style="vertical-align:top;" width="250">
|
<td style="vertical-align:top;" width="270">
|
||||||
<table>
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td class="counter-name"><?php print __('Template');?>:</td>
|
||||||
|
<td class="counter-value"><?php echo $data[$key]['TPL'] ?></td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="counter-name"><?php print __('SOA') ?>:</td>
|
<td class="counter-name"><?php print __('SOA') ?>:</td>
|
||||||
<td class="counter-value"><?php echo $data[$key]['SOA'] ?></td>
|
<td class="counter-value"><?php echo $data[$key]['SOA'] ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td class="counter-name"><?php print __('TTL') ?>:</td>
|
|
||||||
<td class="counter-value"><?php echo $data[$key]['TTL'] ?></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
<td rowspan=4 style="vertical-align:top;" width="300">
|
<td rowspan=4 style="vertical-align:top;" width="300">
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="counter-name"><?php print __('Expire');?>:</td>
|
<td class="counter-name"><?php print __('TTL') ?>:</td>
|
||||||
<td class="counter-value"><?php echo strftime("%d %b %Y", strtotime($data[$key]['EXP'])) ?></td>
|
<td class="counter-value"><?php echo $data[$key]['TTL'] ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="counter-name"><?php print __('Records');?>:</td>
|
<td class="counter-name"><?php print __('Expire');?>:</td>
|
||||||
<td class="counter-value"><?php echo $data[$key]['RECORDS'] ?></td>
|
<td class="counter-value"><?php echo strftime("%d %b %Y", strtotime($data[$key]['EXP'])) ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
|
|
|
@ -96,21 +96,16 @@
|
||||||
<td style="vertical-align:top;" >
|
<td style="vertical-align:top;" >
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="counter-name" style="padding: 2px 0 2px 0">
|
<td class="chart1" style="padding: 10px 0 2px 0">
|
||||||
<?php print __('Catchall email');?> > <?php echo $data[$key]['CATCHALL'] ?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="chart1">
|
|
||||||
<?php print __('Disk');?>: <?php echo humanize_usage($data[$key]['U_DISK']) ?>
|
<?php print __('Disk');?>: <?php echo humanize_usage($data[$key]['U_DISK']) ?>
|
||||||
<div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;">
|
<div style="width:160px; height:5px; font-size:0;background-color:#c7d5b3;">
|
||||||
<div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$panel[$user]['DISK_QUOTA']) ?>%; height:6px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
|
<div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$panel[$user]['DISK_QUOTA']) ?>%; height:5px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
<td style="vertical-align:top;" width="250">
|
<td style="vertical-align:top;" width="260">
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="counter-name">
|
<td class="counter-name">
|
||||||
|
@ -142,10 +137,10 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="counter-name">
|
<td class="counter-name">
|
||||||
<?php print __('Accounts');?>:
|
<?php print __('Catchall email');?>:
|
||||||
</td>
|
</td>
|
||||||
<td class="counter-value">
|
<td class="counter-value">
|
||||||
<?php echo $data[$key]['ACCOUNTS'] ?>
|
<?php echo $data[$key]['CATCHALL'] ?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -85,10 +85,10 @@
|
||||||
<?php echo $data[$key]['IP'] ?>
|
<?php echo $data[$key]['IP'] ?>
|
||||||
</td>
|
</td>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="chart1" style="padding: 0 0 2px 0">
|
<td class="chart1" style="padding: 2px 0 2px 0">
|
||||||
<?php print __('Disk');?>: <?php echo humanize_usage($data[$key]['U_DISK']) ?>
|
<?php print __('Disk');?>: <?php echo humanize_usage($data[$key]['U_DISK']) ?>
|
||||||
<div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;">
|
<div style="width:160px; height:5px; font-size:0;background-color:#c7d5b3;">
|
||||||
<div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$data[$key]['QUOTA']) ?>%; height:6px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
|
<div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$data[$key]['QUOTA']) ?>%; height:5px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
|
@ -25,16 +25,11 @@
|
||||||
<tr class="data-row">
|
<tr class="data-row">
|
||||||
<td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150px">
|
<td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150px">
|
||||||
<table class="data-col1" width="150">
|
<table class="data-col1" width="150">
|
||||||
<tr><td style="padding: 24 0 4 0;"><a class="data-date"><?php echo strftime("%d %b %Y", strtotime($key))?></a></td></tr>
|
<tr><td style="padding: 24 0 4 0;"><a class="data-date" ><?php echo strftime("%d %b %Y", strtotime($key))?></a></td></tr>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
<td class="data-dotted" width="830px" style="vertical-align:top;">
|
<td class="data-dotted" width="830px" style="vertical-align:top;">
|
||||||
<table width="830px">
|
<div style="height:20px; width:20px;"></div>
|
||||||
<tr>
|
|
||||||
<td></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<table class="data-col2" width="830px">
|
<table class="data-col2" width="830px">
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan=3 class="username" style="padding: 10 0 0 4px;">
|
<td colspan=3 class="username" style="padding: 10 0 0 4px;">
|
||||||
|
@ -45,23 +40,18 @@
|
||||||
<td style="vertical-align:top;" >
|
<td style="vertical-align:top;" >
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan=2 class="counter-name" style="padding: 2px 0px 6px 2px;">
|
<td class="chart1" colspan=2 style="padding: 4px 0 0 2px;">
|
||||||
[<?php echo $data[$key]['PACKAGE']?>] <?php print __('package');?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="chart1" colspan=2 style="padding: 0 0 0 2px;">
|
|
||||||
<?php print __('Bandwidth');?>: <?php echo get_percentage($data[$key]['U_BANDWIDTH'],$data[$key]['BANDWIDTH']) ?>% (<?php echo humanize_usage($data[$key]['U_BANDWIDTH']) ?>)
|
<?php print __('Bandwidth');?>: <?php echo get_percentage($data[$key]['U_BANDWIDTH'],$data[$key]['BANDWIDTH']) ?>% (<?php echo humanize_usage($data[$key]['U_BANDWIDTH']) ?>)
|
||||||
<div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;">
|
<div style="width:160px; height:7px; font-size:0;background-color:#c7d5b3;">
|
||||||
<div style="width:<?php echo get_percentage($data[$key]['U_BANDWIDTH'],$data[$key]['BANDWIDTH']) ?>%; height:6px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
|
<div style="width:<?php echo get_percentage($data[$key]['U_BANDWIDTH'],$data[$key]['BANDWIDTH']) ?>%; height:7px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="chart1" colspan=2 style="padding: 0 0 0 2px;">
|
<td class="chart1" colspan=2 style="padding: 0 0 0 2px;">
|
||||||
<?php print __('Disk');?>: <?php echo get_percentage($data[$key]['U_DISK'],$data[$key]['DISK_QUOTA']) ?>% (<?php echo humanize_usage($data[$key]['U_DISK']) ?>)
|
<?php print __('Disk');?>: <?php echo get_percentage($data[$key]['U_DISK'],$data[$key]['DISK_QUOTA']) ?>% (<?php echo humanize_usage($data[$key]['U_DISK']) ?>)
|
||||||
<div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;">
|
<div style="width:160px; height:7px; font-size:0;background-color:#c7d5b3;">
|
||||||
<div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$data[$key]['DISK_QUOTA']) ?>%; height:6px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
|
<div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$data[$key]['DISK_QUOTA']) ?>%; height:7px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
|
@ -70,12 +60,18 @@
|
||||||
<table class="chart2">
|
<table class="chart2">
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<?php print __('Web');?>: <?php echo humanize_usage($data[$key]['U_DISK_WEB'])?><br>
|
<?php print __('Web');?>: <?php echo humanize_usage($data[$key]['U_DISK_WEB'])?>
|
||||||
<?php print __('Mail');?>: <?php echo humanize_usage($data[$key]['U_DISK_MAIL'])?><br>
|
|
||||||
</td>
|
</td>
|
||||||
<td style="padding: 0px 10px 0px 8px">
|
<td style="padding: 0px 0px 0px 4px">
|
||||||
<?php print __('Databases');?>: <?php echo humanize_usage($data[$key]['U_DISK_DB'])?><br>
|
<?php print __('Databases');?>: <?php echo humanize_usage($data[$key]['U_DISK_DB'])?>
|
||||||
<?php print __('User Directories');?>: <?php echo humanize_usage($data[$key]['U_DISK_DIRS'])?><br>
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<?php print __('Mail');?>: <?php echo humanize_usage($data[$key]['U_DISK_MAIL'])?>
|
||||||
|
</td>
|
||||||
|
<td style="padding: 0px 0px 0px 4px">
|
||||||
|
<?php print __('User Directories');?>: <?php echo humanize_usage($data[$key]['U_DISK_DIRS'])?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
|
@ -60,35 +60,42 @@
|
||||||
<td colspan=3 class="username" style="padding: 0 0 0 4px;"><b><?php echo $key ?></b><a class="fullname"><?php echo $data[$key]['FNAME']?> <?php echo $data[$key]['LNAME']?></a></td>
|
<td colspan=3 class="username" style="padding: 0 0 0 4px;"><b><?php echo $key ?></b><a class="fullname"><?php echo $data[$key]['FNAME']?> <?php echo $data[$key]['LNAME']?></a></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td style="vertical-align:top;" width="240">
|
<td style="vertical-align:top;" width="260">
|
||||||
<table>
|
<table>
|
||||||
<tr><td colspan=2 class="counter-name" style="padding: 2px 0 0 2px;"><?php echo $data[$key]['CONTACT']?></td></tr>
|
<tr><td colspan=2 class="counter-name" style="padding: 2px 0 0 2px;"><?php echo $data[$key]['CONTACT']?></td></tr>
|
||||||
<tr><td colspan=2 class="counter-name" style="padding: 0 0 18px 2px;">[<?php echo $data[$key]['PACKAGE']?>] <?php print __('package');?></td></tr>
|
<tr><td colspan=2 class="counter-name" style="padding: 0 0 8px 2px;">[<?php echo $data[$key]['PACKAGE']?>] <?php print __('package');?></td></tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="chart1" colspan=2 style="padding: 0 0 0 3px;"><?php print __('Bandwidth');?>: <?php echo get_percentage($data[$key]['U_BANDWIDTH'],$data[$key]['BANDWIDTH']) ?>% (<?php echo humanize_usage($data[$key]['U_BANDWIDTH']) ?>)
|
<td class="chart1" colspan=2 style="padding: 0 0 0 3px;"><?php print __('Bandwidth');?>: <?php echo get_percentage($data[$key]['U_BANDWIDTH'],$data[$key]['BANDWIDTH']) ?>% (<?php echo humanize_usage($data[$key]['U_BANDWIDTH']) ?>)
|
||||||
<div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;">
|
<div style="width:160px; height:7px; font-size:0;background-color:#c7d5b3;">
|
||||||
<div style="width:<?php echo get_percentage($data[$key]['U_BANDWIDTH'],$data[$key]['BANDWIDTH']) ?>%; height:6px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
|
<div style="width:<?php echo get_percentage($data[$key]['U_BANDWIDTH'],$data[$key]['BANDWIDTH']) ?>%; height:7px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="chart1" colspan=2 style="padding: 0 0 0 3px;"><?php print __('Disk');?>: <?php echo get_percentage($data[$key]['U_DISK'],$data[$key]['DISK_QUOTA']) ?>% (<?php echo humanize_usage($data[$key]['U_DISK']) ?>)
|
<td class="chart1" colspan=2 style="padding: 0 0 0 3px;"><?php print __('Disk');?>: <?php echo get_percentage($data[$key]['U_DISK'],$data[$key]['DISK_QUOTA']) ?>% (<?php echo humanize_usage($data[$key]['U_DISK']) ?>)
|
||||||
<div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;">
|
<div style="width:160px; height:7px; font-size:0;background-color:#c7d5b3;">
|
||||||
<div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$data[$key]['DISK_QUOTA']) ?>%; height:6px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
|
<div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$data[$key]['DISK_QUOTA']) ?>%; height:7px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan=2>
|
<td colspan=2 style="padding: 2px 0 0 0;">
|
||||||
<table class="chart2">
|
<table class="chart2">
|
||||||
<tr>
|
<tr>
|
||||||
<td>
|
<td>
|
||||||
<?php print __('Web');?>: <?php echo humanize_usage($data[$key]['U_DISK_WEB'])?><br>
|
<?php print __('Web');?>: <?php echo humanize_usage($data[$key]['U_DISK_WEB'])?>
|
||||||
<?php print __('Mail');?>: <?php echo humanize_usage($data[$key]['U_DISK_MAIL'])?><br>
|
|
||||||
</td>
|
</td>
|
||||||
<td style="padding: 0px 10px 0px 8px">
|
<td style="padding: 0px 0px 0px 4px">
|
||||||
<?php print __('Databases');?>: <?php echo humanize_usage($data[$key]['U_DISK_DB'])?><br>
|
<?php print __('Databases');?>: <?php echo humanize_usage($data[$key]['U_DISK_DB'])?>
|
||||||
<?php print __('User Directories');?>: <?php echo humanize_usage($data[$key]['U_DISK_DIRS'])?><br>
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<?php print __('Mail');?>: <?php echo humanize_usage($data[$key]['U_DISK_MAIL'])?>
|
||||||
|
|
||||||
|
</td>
|
||||||
|
<td style="padding: 0px 0px 0px 4px">
|
||||||
|
<?php print __('User Directories');?>: <?php echo humanize_usage($data[$key]['U_DISK_DIRS'])?>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@ -96,12 +103,8 @@
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
<td style="vertical-align:top;" width="320">
|
<td style="vertical-align:top;" width="300">
|
||||||
<table width="300">
|
<table width="290">
|
||||||
<tr>
|
|
||||||
<td class="counter-name" width="36%"><?php print __('Template');?>:</td>
|
|
||||||
<td class="counter-value"><?php echo $data[$key]['TEMPLATE'] ?></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="counter-name"><?php print __('Web Domains');?>:</td>
|
<td class="counter-name"><?php print __('Web Domains');?>:</td>
|
||||||
<td class="counter-value"><?php echo $data[$key]['U_WEB_DOMAINS'] ?> / <?php echo $data[$key]['WEB_DOMAINS'] ?></td>
|
<td class="counter-value"><?php echo $data[$key]['U_WEB_DOMAINS'] ?> / <?php echo $data[$key]['WEB_DOMAINS'] ?></td>
|
||||||
|
|
|
@ -34,9 +34,11 @@
|
||||||
if ($data[$key]['SUSPENDED'] == 'yes') {
|
if ($data[$key]['SUSPENDED'] == 'yes') {
|
||||||
$status = 'suspended';
|
$status = 'suspended';
|
||||||
$spnd_action = 'unsuspend' ;
|
$spnd_action = 'unsuspend' ;
|
||||||
|
$spnd_confirmation = 'UNSUSPEND_DOMAIN_CONFIRMATION' ;
|
||||||
} else {
|
} else {
|
||||||
$status = 'active';
|
$status = 'active';
|
||||||
$spnd_action = 'suspend' ;
|
$spnd_action = 'suspend' ;
|
||||||
|
$spnd_confirmation = 'SUSPEND_DOMAIN_CONFIRMATION' ;
|
||||||
}
|
}
|
||||||
if (!empty($data[$key]['SSL_HOME'])) {
|
if (!empty($data[$key]['SSL_HOME'])) {
|
||||||
if ($data[$key]['SSL_HOME'] == 'same') {
|
if ($data[$key]['SSL_HOME'] == 'same') {
|
||||||
|
@ -55,22 +57,21 @@
|
||||||
if (!empty($data[$key]['FTP_USER'])) {
|
if (!empty($data[$key]['FTP_USER'])) {
|
||||||
$ftp_user=$data[$key]['FTP_USER'];
|
$ftp_user=$data[$key]['FTP_USER'];
|
||||||
}
|
}
|
||||||
$nginx_support='no';
|
$proxy_support='no';
|
||||||
if (!empty($data[$key]['NGINX'])) {
|
if (!empty($data[$key]['PROXY'])) {
|
||||||
$nginx_support='yes';
|
$proxy_support='yes';
|
||||||
}
|
}
|
||||||
if (strlen($data[$key]['NGINX_EXT']) > 16 ) {
|
if (strlen($data[$key]['PROXY_EXT']) > 16 ) {
|
||||||
$nginx_ext_title = str_replace(',', ', ', $data[$key]['NGINX_EXT']);
|
$proxy_ext_title = str_replace(',', ', ', $data[$key]['PROXY_EXT']);
|
||||||
$nginx_ext = substr($data[$key]['NGINX_EXT'], 0, 16);
|
$proxy_ext = substr($data[$key]['PROXY_EXT'], 0, 16);
|
||||||
$nginx_ext = trim($nginx_ext, ",");
|
$proxy_ext = trim($proxy_ext, ",");
|
||||||
$nginx_ext = str_replace(',', ', ', $nginx_ext);
|
$proxy_ext = str_replace(',', ', ', $proxy_ext);
|
||||||
$nginx_ext = $nginx_ext.", ...";
|
$proxy_ext = $proxy_ext.", ...";
|
||||||
} else {
|
} else {
|
||||||
$nginx_ext_title = '';
|
$proxy_ext_title = '';
|
||||||
$nginx_ext = str_replace(',', ', ', $data[$key]['NGINX_EXT']);
|
$proxy_ext = str_replace(',', ', ', $data[$key]['PROXY_EXT']);
|
||||||
}
|
}
|
||||||
?>
|
?>
|
||||||
|
|
||||||
<tr class="data-row">
|
<tr class="data-row">
|
||||||
<td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150">
|
<td class="data-dotted" style="padding: 0px 10px 0px 0px" width="150">
|
||||||
<table class="data-col1">
|
<table class="data-col1">
|
||||||
|
@ -83,7 +84,7 @@
|
||||||
<a id="delete_link_<?php echo $i ?>" class="data-controls do_delete">
|
<a id="delete_link_<?php echo $i ?>" class="data-controls do_delete">
|
||||||
<span class="do_delete">
|
<span class="do_delete">
|
||||||
<img src="/images/delete.png" width="7px" height="7px">
|
<img src="/images/delete.png" width="7px" height="7px">
|
||||||
<?php print __('delete');?>
|
<?php print __('delete');?>
|
||||||
<input type="hidden" name="delete_url" value="/delete/web/?domain=<?php echo $key ?>" />
|
<input type="hidden" name="delete_url" value="/delete/web/?domain=<?php echo $key ?>" />
|
||||||
<div id="delete_dialog_<?php echo $i ?>" class="confirmation-text-delete hidden" title="<?php print __('Confirmation');?>">
|
<div id="delete_dialog_<?php echo $i ?>" class="confirmation-text-delete hidden" title="<?php print __('Confirmation');?>">
|
||||||
<p class="counter-value"><?php print __('DELETE_DOMAIN_CONFIRMATION',$key);?></p>
|
<p class="counter-value"><?php print __('DELETE_DOMAIN_CONFIRMATION',$key);?></p>
|
||||||
|
@ -93,7 +94,7 @@
|
||||||
<a href="/edit/web/?domain=<?php echo $key ?>" class="data-controls">
|
<a href="/edit/web/?domain=<?php echo $key ?>" class="data-controls">
|
||||||
<span>
|
<span>
|
||||||
<img src="/images/edit.png" width="8px" height="8px">
|
<img src="/images/edit.png" width="8px" height="8px">
|
||||||
<?php print __('edit');?>
|
<?php print __('edit');?>
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
<?php
|
<?php
|
||||||
|
@ -102,7 +103,7 @@
|
||||||
<a href="http://<?php echo $key ?>/vstats/" target="_blank" class="data-controls">
|
<a href="http://<?php echo $key ?>/vstats/" target="_blank" class="data-controls">
|
||||||
<span>
|
<span>
|
||||||
<img src="/images/new_window.png" width="8px" height="8px">
|
<img src="/images/new_window.png" width="8px" height="8px">
|
||||||
<?php print __('open webstats');?>
|
<?php print __('open webstats');?>
|
||||||
</span>
|
</span>
|
||||||
</a>
|
</a>
|
||||||
<?php
|
<?php
|
||||||
|
@ -122,53 +123,60 @@
|
||||||
<?php echo $data[$key]['IP'] ?>
|
<?php echo $data[$key]['IP'] ?>
|
||||||
</td>
|
</td>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="counter-name" style="padding: 0 0 8px 2px">
|
|
||||||
[<?php echo $data[$key]['TPL'] ?>] <?php print __('template');?>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="chart1" style="padding: 0 0 0 2px">
|
<td class="chart1" style="padding: 2px 0 0 2px">
|
||||||
<?php print __('Bandwidth');?>: <?php echo humanize_usage($data[$key]['U_BANDWIDTH']) ?>
|
<?php print __('Bandwidth');?>: <?php echo humanize_usage($data[$key]['U_BANDWIDTH']) ?>
|
||||||
<div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;">
|
<div style="width:160px; height:5px; font-size:0;background-color:#c7d5b3;">
|
||||||
<div style="width:<?php echo get_percentage($data[$key]['U_BANDWIDTH'],$panel[$user]['BANDWIDTH']) ?>%; height:6px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
|
<div style="width:<?php echo get_percentage($data[$key]['U_BANDWIDTH'],$panel[$user]['BANDWIDTH']) ?>%; height:5px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="chart1" style="padding: 0 0 0 2px"><?php print __('Disk');?>: <?php echo humanize_usage($data[$key]['U_DISK']) ?>
|
<td class="chart1" style="padding: 0 0 0 2px"><?php print __('Disk');?>: <?php echo humanize_usage($data[$key]['U_DISK']) ?>
|
||||||
<div style="width:160px; height:6px; font-size:0;background-color:#c7d5b3;">
|
<div style="width:160px; height:5px; font-size:0;background-color:#c7d5b3;">
|
||||||
<div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$panel[$user]['DISK_QUOTA']) ?>%; height:6px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
|
<div style="width:<?php echo get_percentage($data[$key]['U_DISK'],$panel[$user]['DISK_QUOTA']) ?>%; height:5px; background-color:#9bbb62; border-right:1px #9bbb62 solid;"></div>
|
||||||
</div>
|
</div>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</td>
|
</td>
|
||||||
<td style="vertical-align:top;" width="300">
|
<td style="vertical-align:top;" width="260">
|
||||||
<table>
|
<table>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="counter-name" width="110"><?php print __('SSL Support');?>:</td>
|
<td class="counter-name"><?php print __('Web Template');?>:</td>
|
||||||
<td class="counter-value"><?php print __($data[$key]['SSL']) ?></td>
|
<td class="counter-value"><?php print __($data[$key]['TPL']) ?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="counter-name"><?php print __('SSL Support');?>:</td>
|
||||||
|
<td class="counter-value"><?php print $data[$key]['SSL'] ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td class="counter-name"><?php print __('SSL Home Directory');?>:</td>
|
<td class="counter-name"><?php print __('SSL Home Directory');?>:</td>
|
||||||
<td class="counter-value"><?php echo $ssl_home ?></td>
|
<td class="counter-value"><?php print $ssl_home ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
|
||||||
<td class="counter-name"><?php print __('Nginx Support');?>:</td>
|
|
||||||
<td class="counter-value"><?php print __($nginx_support) ?></td>
|
|
||||||
</tr>
|
|
||||||
<tr>
|
|
||||||
<td class="counter-name"><?php print __('Nginx Extentions');?>:</td>
|
|
||||||
<td class="counter-value" <?php if (!empty($nginx_ext_title)) echo "title='".$nginx_ext_title."'" ?>><?php echo $nginx_ext ?></td>
|
|
||||||
</tr>
|
|
||||||
</table>
|
|
||||||
</td>
|
|
||||||
<td rowspan=4 style="vertical-align:top;" width="240">
|
|
||||||
<table>
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="counter-name"><?php print __('Web Statistics');?>: </td>
|
<td class="counter-name"><?php print __('Web Statistics');?>: </td>
|
||||||
<td class="counter-value"> <?php print __($web_stats) ?></td>
|
<td class="counter-value"> <?php print __($web_stats) ?></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
|
||||||
|
</table>
|
||||||
|
</td>
|
||||||
|
<td rowspan=4 style="vertical-align:top;" width="300">
|
||||||
|
<table>
|
||||||
|
<tr>
|
||||||
|
<td class="counter-name"><?php print __('Proxy Support');?>:</td>
|
||||||
|
<td class="counter-value"><?php print __($proxy_support);?></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td class="counter-name"><?php print __('Proxy Template');?>:</td>
|
||||||
|
<td class="counter-value"><?php echo $data[$key]['PROXY'];?></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
|
<tr>
|
||||||
|
<td class="counter-name"><?php print __('Proxy Extentions');?>:</td>
|
||||||
|
<td class="counter-value" <?php if (!empty($proxy_ext_title)) echo "title='".$proxy_ext_title."'" ?>><?php echo $proxy_ext ?></td>
|
||||||
|
</tr>
|
||||||
|
|
||||||
<tr>
|
<tr>
|
||||||
<td class="counter-name"> <?php print __('Additional FTP Account');?>:</td>
|
<td class="counter-name"> <?php print __('Additional FTP Account');?>:</td>
|
||||||
<td class="counter-value"> <?php print __($ftp_user) ?></td>
|
<td class="counter-value"> <?php print __($ftp_user) ?></td>
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue