Permalink
Browse files

fixed paths for updating or deleting SSL certificates

  • Loading branch information...
Magentron committed Apr 7, 2013
1 parent c667274 commit 2cf46162de8defecb2067deb40ca5bcde9c63cc4
Showing with 6 additions and 6 deletions.
  1. +5 −5 bin/v-change-web-domain-sslcert
  2. +1 −1 bin/v-delete-web-domain-ssl
@@ -43,7 +43,7 @@ is_web_domain_cert_valid

# Deleting old certificate
tmpdir=$(mktemp -p $HOMEDIR/$user/web/$domain/private -d)
rm -f $HOMEDIR/$user/conf/ssl.$domain.*
rm -f $HOMEDIR/$user/conf/web/ssl.$domain.*
mv $USER_DATA/ssl/$domain.* $tmpdir
chown -R $user:$user $tmpdir

@@ -57,11 +57,11 @@ if [ -e "$ssl_dir/$domain.ca" ]; then
fi

# Adding new certificate to user dir
cp -f $USER_DATA/ssl/$domain.crt $HOMEDIR/$user/conf/ssl.$domain.crt
cp -f $USER_DATA/ssl/$domain.key $HOMEDIR/$user/conf/ssl.$domain.key
cp -f $USER_DATA/ssl/$domain.pem $HOMEDIR/$user/conf/ssl.$domain.pem
cp -f $USER_DATA/ssl/$domain.crt $HOMEDIR/$user/conf/web/ssl.$domain.crt
cp -f $USER_DATA/ssl/$domain.key $HOMEDIR/$user/conf/web/ssl.$domain.key
cp -f $USER_DATA/ssl/$domain.pem $HOMEDIR/$user/conf/web/ssl.$domain.pem
if [ -e "$USER_DATA/ssl/$domain.ca" ]; then
cp -f $USER_DATA/ssl/$domain.ca $HOMEDIR/$user/conf/ssl.$domain.ca
cp -f $USER_DATA/ssl/$domain.ca $HOMEDIR/$user/conf/web/ssl.$domain.ca
fi


@@ -56,7 +56,7 @@ fi

# Deleting old certificate
tmpdir=$(mktemp -p $HOMEDIR/$user/web/$domain/private -d)
rm -f $HOMEDIR/$user/conf/ssl.$domain.*
rm -f $HOMEDIR/$user/conf/web/ssl.$domain.*
mv $USER_DATA/ssl/$domain.* $tmpdir
chown -R $user:$user $tmpdir

0 comments on commit 2cf4616

Please sign in to comment.