mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-14 02:28:03 -07:00
fixed missing ssl certificate on restore
This commit is contained in:
parent
6d23a8c524
commit
423fcef77b
1 changed files with 11 additions and 3 deletions
|
@ -288,6 +288,14 @@ if [ "$web" != 'no' ]; then
|
|||
str="$str TIME='$(date +%T)' DATE='$(date +%F)'"
|
||||
echo $str >> $USER_DATA/web.conf
|
||||
|
||||
# Copy ssl certificate
|
||||
if [ "$SSL" = 'yes' ]; then
|
||||
for crt in $(ls $tmpdir/web/$domain/conf |grep ssl); do
|
||||
crt=$(echo "$crt" |sed "s/ssl.//")
|
||||
cp -f $tmpdir/web/$domain/conf/ssl.$crt $USER_DATA/ssl/$crt
|
||||
done
|
||||
fi
|
||||
|
||||
# Rebuild web config
|
||||
rebuild_web_domain_conf
|
||||
|
||||
|
@ -303,7 +311,7 @@ if [ "$web" != 'no' ]; then
|
|||
fi
|
||||
|
||||
# Adding SSL vhost
|
||||
if [ "$ssl_change" = 'yes' ]; then
|
||||
if [ "$SSL" = 'yes' ]; then
|
||||
tmp_conf="$HOMEDIR/$user/conf/web/tmp_s$WEB_SYSTEM.conf"
|
||||
conf="$HOMEDIR/$user/conf/web/s$WEB_SYSTEM.conf"
|
||||
cat $tmp_conf >> $conf
|
||||
|
@ -316,7 +324,7 @@ if [ "$web" != 'no' ]; then
|
|||
|
||||
# Adding proxy vhost
|
||||
proxy_conf="/etc/$PROXY_SYSTEM/conf.d/vesta.conf"
|
||||
if [ "$proxy_change" = 'yes' ]; then
|
||||
if [ ! -z "$PROXY" ]; then
|
||||
tmp_conf="$HOMEDIR/$user/conf/web/tmp_$PROXY_SYSTEM.conf"
|
||||
conf="$HOMEDIR/$user/conf/web/$PROXY_SYSTEM.conf"
|
||||
cat $tmp_conf >> $conf
|
||||
|
@ -328,7 +336,7 @@ if [ "$web" != 'no' ]; then
|
|||
fi
|
||||
|
||||
# Adding SSL proxy vhost
|
||||
if [ "$proxy_change" = 'yes' ] && [ "$ssl_change" = 'yes' ]; then
|
||||
if [ ! -z "$PROXY" ] && [ "$SSL" = 'yes' ]; then
|
||||
tmp_conf="$HOMEDIR/$user/conf/web/tmp_s$PROXY_SYSTEM.conf"
|
||||
conf="$HOMEDIR/$user/conf/web/s$PROXY_SYSTEM.conf"
|
||||
cat $tmp_conf >> $conf
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue