1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-05-05 03:23:49 +08:00
go-cqhttp/docker-entrypoint.sh
felinae98 9b9ecd6a41
chore(docker): adjust dockerfile and entrypoint (#2194)
* chore(docker): adjust dockerfile and entrypoint
2023-06-04 10:23:45 +08:00

21 lines
485 B
Bash

#!/bin/sh
USER=abc
echo "---Setup Timezone to ${TZ}---"
echo "${TZ}" > /etc/timezone
echo "---Checking if UID: ${UID} matches user---"
usermod -o -u ${UID} ${USER}
echo "---Checking if GID: ${GID} matches user---"
groupmod -o -g ${GID} ${USER} > /dev/null 2>&1 ||:
usermod -g ${GID} ${USER}
echo "---Setting umask to ${UMASK}---"
umask ${UMASK}
echo "---Taking ownership of data...---"
chown -R ${UID}:${GID} /app /data
chmod +x /app/cqhttp
echo "Starting..."
su-exec ${USER} "$@"