Skip to content

Commit

Permalink
Rename SLEEP env
Browse files Browse the repository at this point in the history
  • Loading branch information
brablc committed May 31, 2024
1 parent a227fc0 commit e1a304a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions docker-cmd.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
source ./config.sh
source ./logger.sh

SLEEP=${SLEEP:-10s}
LOOP_SLEEP=${LOOP_SLEEP:-10s}

test -z "$ALERT_SCRIPT" && log_warn "Env ALERT_SCRIPT not defined - alerting disabled"
test -z "$SWARM_NAME" && log_warn "Env SWARM_NAME not defined using default"
Expand Down Expand Up @@ -50,9 +50,9 @@ function check_services() {
log_info "Initial list of services (run services.sh using docker exec to see actual):"
./services.sh

log_info "Entering loop with ${SLEEP} sleep ..."
log_info "Entering loop with ${LOOP_SLEEP} sleep ..."

while true; do
sleep $SLEEP
sleep $LOOP_SLEEP
check_services
done
2 changes: 1 addition & 1 deletion test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ docker run --rm \
-it \
--name $NAME \
--network $network \
--env SLEEP="$SLEEP" \
--env LOOP_SLEEP="$LOOP_SLEEP" \
--env ALERT_SCRIPT="$ALERT_SCRIPT" \
--env SWARM_NAME="$SWARM_NAME" \
--env ZENDUTY_API_KEY="$ZENDUTY_API_KEY" \
Expand Down

0 comments on commit e1a304a

Please sign in to comment.