sunetdrive/templates/scriptreceiver/list_users.erb.sh

12 lines
363 B
Bash
Raw Permalink Normal View History

2023-02-13 09:44:56 +00:00
#!/bin/bash
container=${1}
if ! [[ ${container} == 'nextcloud_app_1' ]] && ! [[ ${container} =~ ^nextcloud-[a-z]*_app_1$ ]]; then
2023-02-13 09:44:56 +00:00
echo "Usage: ${0} <nextcloud container name>"
echo "Example : ${0} nextcloud_app_1"
exit 1
fi
docker exec -u www-data -i ${container} php --define apc.enable_cli=1 /var/www/html/occ user:list --limit 10000 --output=json_pretty