mirror of
https://github.com/myvesta/vesta
synced 2025-08-19 21:04:07 -07:00
condition for a proxy
This commit is contained in:
parent
b55acb79f6
commit
82c3bad122
2 changed files with 39 additions and 33 deletions
|
@ -70,7 +70,7 @@ if [ "$SSL" = 'yes' ]; then
|
|||
fi
|
||||
|
||||
# Checking proxy
|
||||
if [ ! -z "$PROXY" ]; then
|
||||
if [ ! -z "$PROXY_SYSTEM" ] && [ ! -z "$PROXY" ]; then
|
||||
tpl_file="$WEBTPL/$PROXY_SYSTEM/$PROXY.tpl"
|
||||
conf="$HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf"
|
||||
del_web_config
|
||||
|
@ -125,6 +125,8 @@ if [ "$domains" -eq '0' ]; then
|
|||
rm -f $HOMEDIR/$user/conf/web/$WEB_SYSTEM.conf
|
||||
fi
|
||||
|
||||
# Proxy
|
||||
if [ ! -z "$PROXY_SYSTEM" ]; then
|
||||
# Checking last SSL proxy
|
||||
conf="/etc/$PROXY_SYSTEM/conf.d/vesta.conf"
|
||||
last_sproxy=$(grep "SSL='yes'" $USER_DATA/web.conf)
|
||||
|
@ -139,6 +141,7 @@ if [ -z "$last_proxy" ]; then
|
|||
sed -i "/.*\/$user\/.*$PROXY_SYSTEM.conf/d" $conf
|
||||
rm -f $HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf
|
||||
fi
|
||||
fi
|
||||
|
||||
# Decrease counters
|
||||
decrease_ip_value "$ip"
|
||||
|
|
|
@ -258,7 +258,7 @@ if [ "$web" != 'no' ]; then
|
|||
fi
|
||||
|
||||
# Check proxy template
|
||||
if [ ! -z "$PROXY" ]; then
|
||||
if [ ! -z "$PROXY_SYSTEM" ] && [ ! -z "$PROXY" ]; then
|
||||
if [ ! -e "$WEBTPL/$PROXY_SYSTEM/$TPL.tpl" ]; then
|
||||
PROXY="default"
|
||||
if [ ! -e "$WEBTPL/$PROXY_SYSTEM/$TPL.tpl" ]; then
|
||||
|
@ -322,6 +322,8 @@ if [ "$web" != 'no' ]; then
|
|||
echo "Include $conf" >> $web_conf
|
||||
fi
|
||||
|
||||
# Proxy
|
||||
if [ ! -z "$PROXY_SYSTEM" ]; then
|
||||
# Adding proxy vhost
|
||||
proxy_conf="/etc/$PROXY_SYSTEM/conf.d/vesta.conf"
|
||||
if [ ! -z "$PROXY" ]; then
|
||||
|
@ -347,6 +349,7 @@ if [ "$web" != 'no' ]; then
|
|||
fi
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
# Restore data
|
||||
tar -xzpf $tmpdir/web/$domain/domain_data.tar.gz \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue