mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-02-24 22:06:00 +08:00
add root user check for mastercontainer
Signed-off-by: Zoey <zoey@z0ey.de>
This commit is contained in:
parent
45ec758e54
commit
a9960c8d6a
1 changed files with 5 additions and 0 deletions
|
@ -20,6 +20,11 @@ case "${1}" in
|
|||
esac
|
||||
}
|
||||
|
||||
if [ "$(whoami)" != "root" ] || [ "$(id -u)" != "0" ] || [ "$(id -g)" != "0" ]; then
|
||||
print_red "Container does not run as root. Cannot continue."
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# Check if socket is available and readable
|
||||
if ! [ -a "/var/run/docker.sock" ]; then
|
||||
print_red "Docker socket is not available. Cannot continue."
|
||||
|
|
Loading…
Reference in a new issue