Skip to content

Commit 16e76ba

Browse files
committed
DEVX-2039: added test for log dir permissions
1 parent 5ae7167 commit 16e76ba

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

microservices-orders/scripts/run-services.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,12 @@ ADDITIONAL_ARGS=${ADDITIONAL_ARGS:-""}
1212
LOG_DIR=${LOG_DIR:="logs"}
1313
PIDS_FILE=${PIDS_FILE:=".microservices.pids"}
1414

15+
# check if we can write to the log directory
16+
if [ ! -w $LOG_DIR ]; then
17+
echo "Unable to write to the logs dir with uid `id -u`. Logging to /tmp."
18+
LOG_DIR=/tmp
19+
fi
20+
1521
echo "Config File arg: $CONFIG_FILE_ARG"
1622
echo "Additional Args: $ADDITIONAL_ARGS"
1723
echo "Starting microservices from $JAR"

0 commit comments

Comments
 (0)