Skip to content

Commit

Permalink
Updated README and added gid check
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Bentley <mbentley@mbentley.net>
  • Loading branch information
mbentley committed Feb 1, 2020
1 parent 273c667 commit 5bfa002
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion README.md
Expand Up @@ -33,7 +33,7 @@ docker run -d \

## Time Zones

By default, this image used the `Etc/UTC` time zone. You may update the time zone used by passing a different value in the `TZ` variable. See [List of tz database time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List) for a complete list of values in the `TZ database name` table column.
By default, this image uses the `Etc/UTC` time zone. You may update the time zone used by passing a different value in the `TZ` variable. See [List of tz database time zones](https://en.wikipedia.org/wiki/List_of_tz_database_time_zones#List) for a complete list of values in the `TZ database name` table column.

## Persistent Data and Permissions

Expand Down
9 changes: 6 additions & 3 deletions entrypoint.sh
Expand Up @@ -10,10 +10,13 @@ echo "INFO: Time zone set to '${TZ}'"
# make sure permissions are set appropriately on each directory
for DIR in data work logs
do
if [ "$(stat -c '%u' /opt/tplink/EAPController/${DIR})" != "508" ]
OWNER="$(stat -c '%u' /opt/tplink/EAPController/${DIR}))"
GROUP="$(stat -c '%g' /opt/tplink/EAPController/${DIR}))"

if [ "${OWNER}" != "508" ] || [ "${GROUP}" != "508" ]
then
echo "ERROR: ownership not set appropriate on /opt/tplink/EAPController/${DIR}"
echo " Hint: ownership should be set to 508:508; see https://github.com/mbentley/docker-omada-controller#persistent-data-and-permissions"
echo "ERROR: owner or group (${OWNER}:${GROUP}) not set correctly on /opt/tplink/EAPController/${DIR}"
echo " Hint: owner and group should be set to 508:508; see https://github.com/mbentley/docker-omada-controller#persistent-data-and-permissions"
exit 1
fi
done
Expand Down

0 comments on commit 5bfa002

Please sign in to comment.