1
0
stack-orchestrator/app/data/container-build/cerc-test-container/run.sh
David Boreham 2e291b3e4c Add trailing newline
Former-commit-id: 5f22afc78baa00bacdfb8f7bc5240e71ba1492c7
2023-01-23 22:11:24 -07:00

17 lines
411 B
Bash
Executable File

#!/bin/sh
# 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;"