Skip to content

Commit 4048e82

Browse files
committed
added ip ownership check
1 parent bb0387f commit 4048e82

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

bin/v_add_web_domain_ssl

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ tpl_option="${4-single}"
1616
source $VESTA/conf/vars.conf
1717
source $V_FUNC/shared_func.sh
1818
source $V_FUNC/domain_func.sh
19+
source $V_FUNC/ip_func.sh
1920

2021

2122
#----------------------------------------------------------#
@@ -46,6 +47,10 @@ is_domain_suspended 'web_domains'
4647
# Checking package
4748
is_package_full 'web_ssl'
4849

50+
# Checking ip ownership
51+
ip=$(get_web_domain_value '$IP')
52+
is_sys_ip_owner
53+
4954
# Check ssl is not added
5055
is_web_domain_key_empty '$SSL'
5156

@@ -64,7 +69,6 @@ is_template_valid 'web'
6469

6570
# Defining variables for template replace
6671
port=$(get_web_port_ssl)
67-
ip=$(get_web_domain_value '$IP')
6872
aliases=$(get_web_domain_value '$ALIAS')
6973
aliases_idn=$(idn -t --quiet -a "$aliases")
7074
email="$user@$domain"
@@ -88,7 +92,7 @@ if [ ! -e "$ssl_cert" ]; then
8892
cp -f $V_USERS/$user/cert/$cert.key $ssl_key
8993
fi
9094

91-
# Running template post setup file
95+
# Running template trigger
9296
if [ -e $V_WEBTPL/apache_$template.sh ]; then
9397
$V_WEBTPL/apache_$template.sh $user $domain $ip $V_HOME $docroot $port
9498
fi

0 commit comments

Comments
 (0)