Skip to content

Commit

Permalink
add check for timezone
Browse files Browse the repository at this point in the history
Signed-off-by: Simon L <szaimen@e.mail.de>
  • Loading branch information
szaimen committed Aug 14, 2023
1 parent 1771a72 commit 35c08c0
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions Containers/mastercontainer/start.sh
Original file line number Diff line number Diff line change
Expand Up @@ -253,6 +253,18 @@ if [ "$?" = 6 ]; then
exit 1
fi

# Check that no changes have been made to timezone settings since AIO only supports running in UTC timezone
if [ -n "$TZ" ]; then
print_red "The environmental variable TZ has been set which is not supported by AIO since it only supports running in the default UTC timezone!"
exit 1
elif mountpoint -q /etc/localtime; then
print_red "/etc/localtime has been mounted into the container which is not allowed because AIO only supports running in the default UTC timezone!"
exit 1
elif mountpoint -q /etc/timezone; then
print_red "/etc/timezone has been mounted into the container which is not allowed because AIO only supports running in the default UTC timezone!"
exit 1
fi

# Add important folders
mkdir -p /mnt/docker-aio-config/data/
mkdir -p /mnt/docker-aio-config/session/
Expand Down

0 comments on commit 35c08c0

Please sign in to comment.