2023-05-18 19:54:27 +00:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
set -e
|
|
|
|
if [ -n "$CERC_SCRIPT_DEBUG" ]; then
|
|
|
|
set -x
|
|
|
|
fi
|
2022-10-31 02:41:05 +00:00
|
|
|
# Test if the container's filesystem is old (run previously) or new
|
2023-06-28 03:18:04 +00:00
|
|
|
EXISTSFILENAME=/data/exists
|
2022-10-31 02:41:05 +00:00
|
|
|
echo "Test container starting"
|
|
|
|
if [[ -f "$EXISTSFILENAME" ]];
|
|
|
|
then
|
2023-05-18 19:54:27 +00:00
|
|
|
TIMESTAMP=`cat $EXISTSFILENAME`
|
2022-10-31 02:41:05 +00:00
|
|
|
echo "Filesystem is old, created: $TIMESTAMP"
|
|
|
|
else
|
|
|
|
echo "Filesystem is fresh"
|
|
|
|
echo `date` > $EXISTSFILENAME
|
|
|
|
fi
|
2023-10-03 18:49:15 +00:00
|
|
|
if [ -n "$CERC_TEST_PARAM_1" ]; then
|
|
|
|
echo "Test-param-1: ${CERC_TEST_PARAM_1}"
|
|
|
|
fi
|
2023-01-24 05:09:56 +00:00
|
|
|
# Run nginx which will block here forever
|
2023-01-24 05:11:24 +00:00
|
|
|
/usr/sbin/nginx -g "daemon off;"
|