Commit 16c0a9d3 authored by Joshua Tauberer's avatar Joshua Tauberer

docker: if container was launched with a tty start bash otherwise loop forever...

docker: if container was launched with a tty start bash otherwise loop forever to keep the container going
parent 7999eae8
...@@ -8,5 +8,22 @@ service opendkim start ...@@ -8,5 +8,22 @@ service opendkim start
service nginx start service nginx start
service php-fastcgi start service php-fastcgi start
echo "Your Mail-in-a-Box is running." if [ -t 0 ]
bash then
# This is an interactive shell. You get a command prompt within
# the container.
#
# You get here by running 'docker run -i -t'.
echo "Welcome to your Mail-in-a-Box."
bash
else
# This is a non-interactive shell. It loops forever to prevent
# the docker container from stopping.
#
# You get here by omitting '-t' from the docker run arguments.
echo "Your Mail-in-a-Box is running..."
while true; do sleep 10; done
fi
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment