mirror of
https://github.com/casjaysdevdocker/ampache
synced 2026-05-18 20:47:48 -04:00
Some checks failed
ampache / release-ampache (push) Has been cancelled
Dockerfile .env.scripts .gitattributes .gitea/ .gitignore LICENSE.md README.md rootfs/root/docker/setup/04-users.sh rootfs/root/docker/setup/05-custom.sh rootfs/tmp/ rootfs/usr/local/bin/entrypoint.sh rootfs/usr/local/bin/pkmgr rootfs/usr/local/etc/docker/bin/ rootfs/usr/local/etc/docker/init.d/
27 lines
907 B
Bash
Executable File
27 lines
907 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
# casjaysdevdocker/ampache - 04-users.sh
|
|
# Defensive user/group creation. The Alpine apache2 and mariadb packages
|
|
# normally create their service users, but we ensure here.
|
|
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
|
|
set -o pipefail
|
|
[ "$DEBUGGER" = "on" ] && echo "Enabling debugging" && set -x$DEBUGGER_OPTIONS
|
|
|
|
exitCode=0
|
|
|
|
if ! getent group apache >/dev/null 2>&1; then
|
|
addgroup -S apache 2>/dev/null || true
|
|
fi
|
|
if ! getent passwd apache >/dev/null 2>&1; then
|
|
adduser -S -G apache -h /var/www -s /sbin/nologin apache 2>/dev/null || true
|
|
fi
|
|
|
|
if ! getent group mysql >/dev/null 2>&1; then
|
|
addgroup -S mysql 2>/dev/null || true
|
|
fi
|
|
if ! getent passwd mysql >/dev/null 2>&1; then
|
|
adduser -S -G mysql -h /data/db/mariadb -s /sbin/nologin mysql 2>/dev/null || true
|
|
fi
|
|
|
|
exit $exitCode
|