0
0
Fork 0
mirror of https://github.com/nextcloud/docker.git synced 2025-03-14 18:35:08 +01:00
nextcloud-docker/docker-entrypoint.sh
Yuxiang Zhu 6bfcdc9b81 Remove the /var/www/html volume
Auto-upgrade procedure in `docker-entrypoint.sh` is also removed
since it won't be necessary if `/var/www/html` is not a volume.
2018-07-05 14:22:29 +08:00

18 lines
489 B
Bash
Executable file

#!/bin/sh
set -eu
if [ "$(id -u)" = 0 ]; then
>&2 echo 'Warning - Running as root is not recommended for security reasons.'
fi
if ! id -nu >/dev/null 2>&1; then
# If there is no entry for the running user ID in the UNIX password file,
# provide an identity for the user
if [ -w /etc/passwd ]; then
cat /etc/passwd > /tmp/passwd
echo "nextcloud:x:$(id -u):0:Nextcloud user:/root:/sbin/nologin" >> /tmp/passwd
cat /tmp/passwd > /etc/passwd
rm /tmp/passwd
fi
fi
exec "$@"