1
0
mirror of https://github.com/Mrs4s/go-cqhttp.git synced 2025-05-04 19:17:37 +08:00
go-cqhttp/docker-entrypoint.sh

21 lines
492 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} /app/cqhttp