File tree Expand file tree Collapse file tree 1 file changed +8
-5
lines changed
Expand file tree Collapse file tree 1 file changed +8
-5
lines changed Original file line number Diff line number Diff line change @@ -140,9 +140,11 @@ restart() {
140140 if check_proxy; then
141141 log_info " Config is valid so requesting restart..."
142142 $HAPROXY_RESTART_CMD
143- else
144- log_info " HAProxy config invalid, not restarting..."
143+ return $?
145144 fi
145+
146+ log_info " HAProxy config invalid, not restarting..."
147+ return 1
146148}
147149
148150start_monitor () {
@@ -423,7 +425,7 @@ cert_init() {
423425sync_haproxy () {
424426 if [ -z " $RENEWED_LINEAGE " ]; then
425427 log_error " sync-haproxy expect RENEWED_LINEAGE variable to be set"
426- exit 1
428+ return 1
427429 fi
428430
429431 DOMAIN_FOLDER=" $RENEWED_LINEAGE "
@@ -433,8 +435,9 @@ sync_haproxy() {
433435
434436 cat " ${DOMAIN_FOLDER} /privkey.pem" \
435437 " ${DOMAIN_FOLDER} /fullchain.pem" \
436- > " /tmp/haproxy.pem"
437- mv " /tmp/haproxy.pem" " ${CERT_DIR} /${DOMAIN} "
438+ > " /tmp/haproxy.pem" || return $?
439+ mv " /tmp/haproxy.pem" " ${CERT_DIR} /${DOMAIN} "
440+ return $?
438441}
439442
440443if [ $# -eq 0 ]
You can’t perform that action at this time.
0 commit comments