go-vod: check for root (fix #916)

Signed-off-by: Varun Patil <radialapps@gmail.com>
pulsejet/aio-hw-docs
Varun Patil 2023-11-15 10:25:23 -08:00
parent 29415b49cf
commit 4a0f9ba183
1 changed files with 7 additions and 0 deletions

View File

@ -28,6 +28,13 @@ if [[ $HOST == http://* ]] && [[ -z $ALLOW_INSECURE ]]; then
exit 1
fi
# Check if the current working directory is writable
if [ ! -w "." ]; then
echo "Current working directory is not writable."
echo "Are you in Docker and non-root (not supported)?"
exit 1
fi
# build URL to fetch binary from Nextcloud
ARCH=$(uname -m)
URL="$HOST/index.php/apps/memories/static/go-vod?arch=$ARCH"