Skip to content
This repository was archived by the owner on Jun 30, 2021. It is now read-only.

Commit fdb98f9

Browse files
committed
Add WARN upon failure while removing LOGS_DIR or RUN_DIR #177
1 parent 59e9c88 commit fdb98f9

File tree

2 files changed

+16
-2
lines changed

2 files changed

+16
-2
lines changed

bin/entry.sh

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ if sudo pwd >/dev/null 2>&1; then
3333
export WE_HAVE_SUDO_ACCESS="true"
3434
else
3535
export WE_HAVE_SUDO_ACCESS="false"
36+
warn "We don't have sudo"
3637
fi
3738

3839
#==============================================
@@ -71,9 +72,18 @@ fi
7172

7273
#-----------------------------------------------
7374
# Perform cleanup to support `docker restart`
75+
log "Stopping supervisord to support docker restart..."
7476
stop >/dev/null 2>&1 || true
75-
rm -f ${LOGS_DIR}/*
76-
rm -f ${RUN_DIR}/*
77+
78+
if ! rm -f ${LOGS_DIR}/* ; then
79+
warn "The container has just started yet we already don't have write access to ${LOGS_DIR}/*"
80+
ls -la ${LOGS_DIR}/ || true
81+
fi
82+
83+
if ! rm -f ${RUN_DIR}/* ; then
84+
warn "The container has just started yet we already don't have write access to ${RUN_DIR}/*"
85+
ls -la ${RUN_DIR}/ || true
86+
fi
7787

7888
#---------------------
7989
# Fix/extend ENV vars

bin/warn

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#!/usr/bin/env bash
2+
3+
# Prints debug info with precise time
4+
exec echo "--${SELENIUM_FIRST_NODE_PORT}WARN $(date "+%H:%M:%S:%N") $@"

0 commit comments

Comments
 (0)