A free, open, self-hosted app platform (GNU AGPLv3): one-click app deploys, Traefik reverse proxy with automatic SSL, rootless Docker support, gluetun VPN routing, and a web dashboard to manage it all. Free & open forever to self-host; optional paid hosted services fund it. See PROMISE.md. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> Signed-off-by: librelad <librelad@digitalangels.vip>
22 lines
674 B
Bash
22 lines
674 B
Bash
#!/bin/bash
|
|
|
|
# Re-index Nextcloud's file metadata — useful after files are added or removed
|
|
# on disk outside of Nextcloud (rsync, restore, manual copy).
|
|
|
|
appNextcloudRescanFiles() {
|
|
local args="$1"
|
|
local username
|
|
username="$(authToolArg "$args" username)"
|
|
|
|
local target=--all
|
|
[[ -n "$username" ]] && target="$username"
|
|
|
|
local out
|
|
out=$(sudo docker exec -u www-data nextcloud-service php occ files:scan $target 2>&1)
|
|
if echo "$out" | grep -qi "scanned\|files found"; then
|
|
isSuccessful "Nextcloud file rescan completed${username:+ for $username}."
|
|
return 0
|
|
fi
|
|
isError "Nextcloud file rescan failed: $out"; return 1
|
|
}
|