diff --git a/CHANGELOG.md b/CHANGELOG.md index b4f2dcb..3a3f281 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,7 @@ ## Changelog ### v7.2.0-beta.1 (coming soon) +* add env PERMISSION_CHECK ([#251](https://github.com/buanet/ioBroker.docker/issues/251)) * add some more DEBUG messages to log * add env IOB_BACKITUP_EXTDB to unlock external db backups in backitup adapter * reorder dockerfile steps to fulfill ioBroker Docker check diff --git a/debian/scripts/iobroker_startup.sh b/debian/scripts/iobroker_startup.sh index f4db7a0..9410d9e 100644 --- a/debian/scripts/iobroker_startup.sh +++ b/debian/scripts/iobroker_startup.sh @@ -18,6 +18,7 @@ objectsdbhost=$IOB_OBJECTSDB_HOST objectsdbport=$IOB_OBJECTSDB_PORT objectsdbtype=$IOB_OBJECTSDB_TYPE packages=$PACKAGES +permissioncheck=$PERMISSION_CHECK setgid=$SETGID setuid=$SETUID statesdbhost=$IOB_STATESDB_HOST @@ -219,11 +220,16 @@ echo "$(printf -- '-%.0s' {1..80})" echo ' ' # (Re)Setting permissions to "/opt/iobroker" and "/opt/scripts" -echo -n "(Re)setting permissions (This might take a while! Please be patient!)... " - chown -R $setuid:$setgid /opt/iobroker - chown -R $setuid:$setgid /opt/scripts -echo 'Done.' -echo ' ' +if [[ "$permissioncheck" == "false" ]]; then + echo "PERMISSION_CHECK is set to false. Use this at your own risk!" + echo ' ' +else + echo -n "(Re)setting permissions (This might take a while! Please be patient!)... " + chown -R $setuid:$setgid /opt/iobroker + chown -R $setuid:$setgid /opt/scripts + echo 'Done.' + echo ' ' +fi # Backing up original iobroker-file and changing sudo to gosu echo -n "Fixing \"sudo-bug\" by replacing sudo with gosu... "