1
0
stack-orchestrator/app/data/container-build/cerc-test-container/run.sh
David Boreham 87c25dfb5e Fix up test stack (#398)
Former-commit-id: 088105c7829254fc8ff1f31b71d28fd916def7eb
2023-05-18 13:54:27 -06:00

20 lines
474 B
Bash
Executable File

#!/usr/bin/env bash
set -e
if [ -n "$CERC_SCRIPT_DEBUG" ]; then
set -x
fi
# Test if the container's filesystem is old (run previously) or new
EXISTSFILENAME=/var/exists
echo "Test container starting"
if [[ -f "$EXISTSFILENAME" ]];
then
TIMESTAMP=`cat $EXISTSFILENAME`
echo "Filesystem is old, created: $TIMESTAMP"
else
echo "Filesystem is fresh"
echo `date` > $EXISTSFILENAME
fi
# Run nginx which will block here forever
/usr/sbin/nginx -g "daemon off;"