100% open-source IoT Platform - Integrate your devices, add intelligence, build custom apps
Java asset-managementbuildingdashboarddataplatformdevice-managementedge-computingenergyenergy-managementenergy-monitorfleet-managementfleet-telematicsiotiot-applicationiot-platformmodbusmqttmqtt-brokerota-updaterules-enginesmartcity
HAProxy updates
Rich Turner91a8a1afa27a
diff --git a/proxy/entrypoint.sh b/proxy/entrypoint.shindex 00ab7cba5..9165b998c 100644--- a/proxy/entrypoint.sh+++ b/proxy/entrypoint.sh@@ -73,8 +73,9 @@ function run_proxy {log_info "Monitoring config file $HAPROXY_CONFIG and certs in $LE_CERT_ROOT for changes..."# Wait if config or certificates were changed, block this execution- while inotifywait -q -r --exclude '\.git/' -e modify,create,delete,move,move_self $HAPROXY_CONFIG $LE_CERT_ROOT; do+ while inotifywait -q -r -e modify,create,delete,move,move_self $HAPROXY_CONFIG "${LE_CERT_ROOT}/${DOMAINNAME}/haproxy.pem"; dolog_info "Change detected..."+ sleep 5restartlog_info "Monitoring config file $HAPROXY_CONFIG and certs in $LE_CERT_ROOT for changes..."done@@ -96,7 +97,7 @@ function restart {log_info "HAPROXY_CMD: ${HAPROXY_CMD}"if $HAPROXY_CHECK_CONFIG_CMD; then- $HAPROXY_CMD -sf $(cat $HAPROXY_PID_FILE)+ $HAPROXY_CMD -st $(cat $HAPROXY_PID_FILE)log_info "HAProxy restarted, pid $(cat $HAPROXY_PID_FILE)."elselog_info "HAProxy config invalid, not restarting..."@@ -393,6 +394,8 @@ shiftif [ "${CMD}" = "run" ]; thenrun_proxy "${@}"+elif [ "${CMD}" = "restart" ]; then+ restartelif [ "${CMD}" = "check" ]; thencheck_proxy "${@}"elif [ "${CMD}" = "add" ]; then