Skip to content

Commit a27cc13

Browse files
committed
Adjust ssl config location.
1 parent 47df6e8 commit a27cc13

File tree

1 file changed

+3
-7
lines changed

1 file changed

+3
-7
lines changed

bin/v-update-host-certificate

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ is_object_unsuspended 'user' 'USER' "$user"
4040
is_object_valid 'web' 'DOMAIN' "$hostname"
4141
is_object_unsuspended 'web' 'DOMAIN' "$hostname"
4242

43-
if [ ! -f "/home/$user/conf/web/ssl.$hostname.pem" ]; then
43+
if [ ! -f "/home/$user/conf/web/$hostname/ssl.$hostname.pem" ]; then
4444
echo "This domain does not have certificate";
4545
exit 1;
4646
fi
@@ -52,13 +52,9 @@ fi
5252
# Get current datetime for backup of old files
5353
backup_datetime=`date '+%Y-%m-%d_%H-%M-%S'`
5454

55-
# Keep a backup of the old certificate - todo: remove in production
56-
#mv $HESTIA/ssl/certificate.crt $HESTIA/ssl/certificate.crt_backup_$backup_datetime
57-
#mv $HESTIA/ssl/certificate.key $HESTIA/ssl/certificate.key_backup_$backup_datetime
58-
5955
# Copy hostnames certificates from user dir
60-
cp /home/$user/conf/web/ssl.$hostname.pem $HESTIA/ssl/certificate.crt
61-
cp /home/$user/conf/web/ssl.$hostname.key $HESTIA/ssl/certificate.key
56+
cp /home/$user/conf/web/$hostname/ssl.$hostname.pem $HESTIA/ssl/certificate.crt
57+
cp /home/$user/conf/web/$hostname/ssl.$hostname.key $HESTIA/ssl/certificate.key
6258

6359
# Checking exim username for later chowning
6460
exim_user="exim";

0 commit comments

Comments
 (0)