File tree Expand file tree Collapse file tree 2 files changed +22
-2
lines changed
Expand file tree Collapse file tree 2 files changed +22
-2
lines changed Original file line number Diff line number Diff line change @@ -116,6 +116,26 @@ if [ "$domains" -eq '0' ]; then
116116 fi
117117fi
118118
119+ # Checking last nginx domain
120+ conf=' /etc/nginx/conf.d/vesta_users.conf'
121+ last_nginx=$( grep -v " NGINX=''" $V_USERS /$user /web.conf)
122+ last_snginx=$( echo " $last_nginx " | grep -v " SSL_CERT=''" )
123+ if [ -z " $last_snginx " ]; then
124+ sline=$( grep -n " $V_HOME /$user /conf/snginx.conf" $conf | cut -f 1 -d : )
125+ if [ ! -z " $sline " ]; then
126+ sed -i " $sline d" $conf
127+ fi
128+ rm -f $V_HOME /$user /conf/snginx.conf
129+ fi
130+
131+ if [ -z " $last_nginx " ]; then
132+ line=$( grep -n " $V_HOME /$user /conf/nginx.conf" $conf | cut -f 1 -d : )
133+ if [ ! -z " $line " ]; then
134+ sed -i " $line d" $conf
135+ fi
136+ rm -f $V_HOME /$user /conf/nginx.conf
137+ fi
138+
119139# Decreasing ip value
120140decrease_ip_value " $old_ip "
121141
Original file line number Diff line number Diff line change @@ -79,15 +79,15 @@ update_web_domain_value '$NGINX_EXT' ''
7979conf=' /etc/nginx/conf.d/vesta_users.conf'
8080last_nginx=$( grep -v " NGINX=''" $V_USERS /$user /web.conf)
8181last_snginx=$( echo " $last_nginx " | grep -v " SSL_CERT=''" )
82- if [ -z " $last_snginx " ]; then
82+ if [ -z " $last_snginx " ]; then
8383 sline=$( grep -n " $V_HOME /$user /conf/snginx.conf" $conf | cut -f 1 -d : )
8484 if [ ! -z " $sline " ]; then
8585 sed -i " $sline d" $conf
8686 fi
8787 rm -f $V_HOME /$user /conf/snginx.conf
8888fi
8989
90- if [ -z " $last_nginx " ]; then
90+ if [ -z " $last_nginx " ]; then
9191 line=$( grep -n " $V_HOME /$user /conf/nginx.conf" $conf | cut -f 1 -d : )
9292 if [ ! -z " $line " ]; then
9393 sed -i " $line d" $conf
You can’t perform that action at this time.
0 commit comments