From 94ffccf1b0b9ccb517f770ad457052d8095c6dd4 Mon Sep 17 00:00:00 2001 From: myvesta <38690722+myvesta@users.noreply.github.com> Date: Sat, 27 Jun 2020 20:24:03 +0200 Subject: [PATCH] Update v-install-unsigned-ssl --- bin/v-install-unsigned-ssl | 29 ++++++++++++++++++++++++++++- 1 file changed, 28 insertions(+), 1 deletion(-) diff --git a/bin/v-install-unsigned-ssl b/bin/v-install-unsigned-ssl index 6e13e6e6b..8f126c3de 100644 --- a/bin/v-install-unsigned-ssl +++ b/bin/v-install-unsigned-ssl @@ -1,5 +1,16 @@ #!/bin/bash +# info: install unsigned SSL to domain +# options: DOMAIN [RESTART] +# +# The function install unsigned SSL to domain + + +#----------------------------------------------------------# +# Variable&Function # +#----------------------------------------------------------# + +# Argument definition if [ $# -lt 1 ]; then echo "usage: v-install-unsigned-ssl DOMAIN [RESTART]" exit 1 @@ -13,6 +24,9 @@ else restart=$2 fi +#----------------------------------------------------------# +# Verifications # +#----------------------------------------------------------# user=$(/usr/local/vesta/bin/v-search-domain-owner $domain) @@ -26,6 +40,10 @@ if [ ! -d "/home/$user/web/$domain/public_html" ]; then exit 1; fi +#----------------------------------------------------------# +# Action # +#----------------------------------------------------------# + email="info@$domain" TMPLOC="/home/$user/tmp/$domain" @@ -45,6 +63,7 @@ sed -n "1,${crt_end}p" $TMPLOC/vst.pem > $TMPLOC/$domain.crt sed -n "$key_start,${key_end}p" $TMPLOC/vst.pem > $TMPLOC/$domain.key chmod 666 $TMPLOC/* +source /usr/local/vesta/func/main.sh source /usr/local/vesta/func/domain.sh USER_DATA="/usr/local/vesta/data/users/$user"; @@ -61,4 +80,12 @@ fi rm -rf $TMPLOC -exit 0 +#----------------------------------------------------------# +# Vesta # +#----------------------------------------------------------# + +# Logging +log_event "$OK" "$ARGUMENTS" + + +exit