mirror of
https://github.com/lancachenet/monolithic
synced 2025-02-16 21:08:26 +00:00
This commit rebases the generic code into the monolithic image This allows the base image to be the more regularly accessed / edited image Commits to lancachenet/generic:switcheroo will mimic this commit Also fixes lancachenet/generic#108
14 lines
550 B
Bash
14 lines
550 B
Bash
#!/bin/bash
|
|
if [ -d "/data/cache/cache" ]; then
|
|
echo "Running fast permissions check"
|
|
ls -l /data/cache/cache | tail --lines=+2 | grep -v ${WEBUSER} > /dev/null
|
|
|
|
if [[ $? -eq 0 || "$FORCE_PERMS_CHECK" == "true" ]]; then
|
|
echo "Doing full checking of permissions (This WILL take a long time on large caches)..."
|
|
find /data \! -user ${WEBUSER} -exec chown ${WEBUSER}:${WEBUSER} '{}' +
|
|
echo "Permissions ok"
|
|
else
|
|
echo "Fast permissions check successful, if you have any permissions error try running with -e FORCE_PERMS_CHECK = true"
|
|
fi
|
|
|
|
fi
|