mirror of
https://github.com/nextcloud/all-in-one.git
synced 2026-02-09 15:28:01 +00:00
Reorganize Docker socket connection check
Signed-off-by: Yunhao Jiang <39151399+yunhao-jiang@users.noreply.github.com>
This commit is contained in:
parent
4a2a8dd002
commit
08f6625e5c
1 changed files with 9 additions and 9 deletions
|
|
@ -75,15 +75,6 @@ elif ! sudo -E -u www-data test -r /var/run/docker.sock; then
|
|||
fi
|
||||
fi
|
||||
|
||||
# Check if api version is supported
|
||||
if ! sudo -E -u www-data docker info &>/dev/null; then
|
||||
print_red "Cannot connect to the docker socket. Cannot proceed."
|
||||
echo "Did you maybe remove group read permissions for the docker socket? AIO needs them in order to access the docker socket."
|
||||
echo "If SELinux is enabled on your host, see https://github.com/nextcloud/all-in-one#are-there-known-problems-when-selinux-is-enabled"
|
||||
echo "If you are on TrueNas SCALE, see https://github.com/nextcloud/all-in-one#can-i-run-aio-on-truenas-scale"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Docker api version check
|
||||
API_VERSION_FILE="$(find ./ -name DockerActionManager.php | head -1)"
|
||||
API_VERSION="$(grep -oP 'const string API_VERSION.*\;' "$API_VERSION_FILE" | grep -oP '[0-9]+.[0-9]+' | head -1)"
|
||||
|
|
@ -115,6 +106,15 @@ else
|
|||
fi
|
||||
fi
|
||||
|
||||
# Check if api version is supported
|
||||
if ! sudo -E -u www-data docker info &>/dev/null; then
|
||||
print_red "Cannot connect to the docker socket. Cannot proceed."
|
||||
echo "Did you maybe remove group read permissions for the docker socket? AIO needs them in order to access the docker socket."
|
||||
echo "If SELinux is enabled on your host, see https://github.com/nextcloud/all-in-one#are-there-known-problems-when-selinux-is-enabled"
|
||||
echo "If you are on TrueNas SCALE, see https://github.com/nextcloud/all-in-one#can-i-run-aio-on-truenas-scale"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check Storage drivers
|
||||
STORAGE_DRIVER="$(sudo -E -u www-data docker info | grep "Storage Driver")"
|
||||
# Check if vfs is used: https://github.com/nextcloud/all-in-one/discussions/1467
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue