Skip to content

Commit fa4b66f

Browse files
author
Serghey Rodin
committed
creating le pipe in order to avoid std out errors
1 parent 70d0ca8 commit fa4b66f

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

bin/v-add-letsencrypt-domain

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,7 @@ get_domain_values 'web'
5151
# Registering LetsEncrypt user account
5252
$BIN/v-add-letsencrypt-user $user
5353
if [ "$?" -ne 0 ]; then
54+
touch $VESTA/data/queue/letsencrypt.pipe
5455
sed -i "/ $domain /d" $VESTA/data/queue/letsencrypt.pipe
5556
send_notice "LETSENCRYPT" "Account registration failed"
5657
check_result $E_CONNECT "LE account registration" >/dev/null
@@ -65,13 +66,15 @@ i=1
6566
for alias in $(echo $domain,$aliases |tr ',' '\n' |sort -u); do
6667
$BIN/v-check-letsencrypt-domain $user $alias
6768
if [ "$?" -ne 0 ]; then
69+
touch $VESTA/data/queue/letsencrypt.pipe
6870
sed -i "/ $domain /d" $VESTA/data/queue/letsencrypt.pipe
6971
send_notice "LETSENCRYPT" "$alias validation failed"
7072
check_result $E_INVALID "LE domain validation" >/dev/null
7173
fi
7274

7375
# Checking LE limits per account
7476
if [ "$i" -gt 100 ]; then
77+
touch $VESTA/data/queue/letsencrypt.pipe
7578
sed -i "/ $domain /d" $VESTA/data/queue/letsencrypt.pipe
7679
send_notice 'LETSENCRYPT' 'Limit of domains per account is reached'
7780
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" \
8689
# Signing CSR
8790
crt=$($BIN/v-sign-letsencrypt-csr $user $domain $ssl_dir)
8891
if [ "$?" -ne 0 ]; then
92+
touch $VESTA/data/queue/letsencrypt.pipe
8993
sed -i "/ $domain /d" $VESTA/data/queue/letsencrypt.pipe
9094
send_notice "LETSENCRYPT" "$alias validation failed"
9195
check_result "$E_INVALID" "LE $domain validation"
@@ -107,6 +111,7 @@ fi
107111
$BIN/v-delete-web-domain-ssl $user $domain >/dev/null 2>&1
108112
$BIN/v-add-web-domain-ssl $user $domain $ssl_dir
109113
if [ "$?" -ne '0' ]; then
114+
touch $VESTA/data/queue/letsencrypt.pipe
110115
sed -i "/ $domain /d" $VESTA/data/queue/letsencrypt.pipe
111116
send_notice 'LETSENCRYPT' "$domain certificate installation failed"
112117
check_result $? "SSL install" >/dev/null
@@ -141,6 +146,7 @@ fi
141146
send_notice 'LETSENCRYPT' "$domain SSL has been installed successfully"
142147

143148
# Deleteing task from queue
149+
touch $VESTA/data/queue/letsencrypt.pipe
144150
sed -i "/ $domain /d" $VESTA/data/queue/letsencrypt.pipe
145151

146152
# Logging

0 commit comments

Comments
 (0)