Skip to content

Commit

Permalink
Improve existing process detection
Browse files Browse the repository at this point in the history
  • Loading branch information
richturner committed Apr 3, 2022
1 parent 5015644 commit bdd7705
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ restart() {

if check_proxy; then
PID=$(cat $HAPROXY_PID_FILE)
if [ -z "$PID" ] || ! pgrep -P $PID > /dev/null; then
if [ -z "$PID" ] || ! pgrep -x "haproxy" > /dev/null; then
log_info "HAProxy is not running so starting"
eval "$HAPROXY_CMD $HAPROXY_START_OPTIONS"
else
Expand Down Expand Up @@ -300,7 +300,7 @@ cron_auto_renewal_init() {
log_info "Executing cron_auto_renewal_init at $(date -R)"

# Start crond if not already started
if ! pgrep crond > /dev/null; then
if ! pgrep -x crond > /dev/null; then
log_info "Starting crond"
crond 1>/dev/null 2>/dev/null
fi
Expand Down

0 comments on commit bdd7705

Please sign in to comment.