mirror of
https://github.com/myvesta/vesta
synced 2025-08-14 02:28:05 -07:00
creating le pipe in order to avoid std out errors
This commit is contained in:
parent
70d0ca89d8
commit
fa4b66f8c7
1 changed files with 6 additions and 0 deletions
|
@ -51,6 +51,7 @@ get_domain_values 'web'
|
|||
# Registering LetsEncrypt user account
|
||||
$BIN/v-add-letsencrypt-user $user
|
||||
if [ "$?" -ne 0 ]; then
|
||||
touch $VESTA/data/queue/letsencrypt.pipe
|
||||
sed -i "/ $domain /d" $VESTA/data/queue/letsencrypt.pipe
|
||||
send_notice "LETSENCRYPT" "Account registration failed"
|
||||
check_result $E_CONNECT "LE account registration" >/dev/null
|
||||
|
@ -65,6 +66,7 @@ i=1
|
|||
for alias in $(echo $domain,$aliases |tr ',' '\n' |sort -u); do
|
||||
$BIN/v-check-letsencrypt-domain $user $alias
|
||||
if [ "$?" -ne 0 ]; then
|
||||
touch $VESTA/data/queue/letsencrypt.pipe
|
||||
sed -i "/ $domain /d" $VESTA/data/queue/letsencrypt.pipe
|
||||
send_notice "LETSENCRYPT" "$alias validation failed"
|
||||
check_result $E_INVALID "LE domain validation" >/dev/null
|
||||
|
@ -72,6 +74,7 @@ for alias in $(echo $domain,$aliases |tr ',' '\n' |sort -u); do
|
|||
|
||||
# Checking LE limits per account
|
||||
if [ "$i" -gt 100 ]; then
|
||||
touch $VESTA/data/queue/letsencrypt.pipe
|
||||
sed -i "/ $domain /d" $VESTA/data/queue/letsencrypt.pipe
|
||||
send_notice 'LETSENCRYPT' 'Limit of domains per account is reached'
|
||||
check_result $E_LIMIT "LE can't sign more than 100 domains"
|
||||
|
@ -86,6 +89,7 @@ ssl_dir=$($BIN/v-generate-ssl-cert "$domain" "$email" "US" "California" \
|
|||
# Signing CSR
|
||||
crt=$($BIN/v-sign-letsencrypt-csr $user $domain $ssl_dir)
|
||||
if [ "$?" -ne 0 ]; then
|
||||
touch $VESTA/data/queue/letsencrypt.pipe
|
||||
sed -i "/ $domain /d" $VESTA/data/queue/letsencrypt.pipe
|
||||
send_notice "LETSENCRYPT" "$alias validation failed"
|
||||
check_result "$E_INVALID" "LE $domain validation"
|
||||
|
@ -107,6 +111,7 @@ fi
|
|||
$BIN/v-delete-web-domain-ssl $user $domain >/dev/null 2>&1
|
||||
$BIN/v-add-web-domain-ssl $user $domain $ssl_dir
|
||||
if [ "$?" -ne '0' ]; then
|
||||
touch $VESTA/data/queue/letsencrypt.pipe
|
||||
sed -i "/ $domain /d" $VESTA/data/queue/letsencrypt.pipe
|
||||
send_notice 'LETSENCRYPT' "$domain certificate installation failed"
|
||||
check_result $? "SSL install" >/dev/null
|
||||
|
@ -141,6 +146,7 @@ fi
|
|||
send_notice 'LETSENCRYPT' "$domain SSL has been installed successfully"
|
||||
|
||||
# Deleteing task from queue
|
||||
touch $VESTA/data/queue/letsencrypt.pipe
|
||||
sed -i "/ $domain /d" $VESTA/data/queue/letsencrypt.pipe
|
||||
|
||||
# Logging
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue