mirror of
https://github.com/nextcloud/all-in-one.git
synced 2025-12-20 06:26:57 +00: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
|
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
|
# Check if socket is available and readable
|
||||||
if ! [ -a "/var/run/docker.sock" ]; then
|
if ! [ -a "/var/run/docker.sock" ]; then
|
||||||
print_red "Docker socket is not available. Cannot continue."
|
print_red "Docker socket is not available. Cannot continue."
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue