mirror of
https://github.com/Mrs4s/go-cqhttp.git
synced 2025-05-05 03:23:49 +08:00
21 lines
485 B
Bash
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} "$@"
|