github.com/Mrs4s/go-cqhttp@v1.2.0/docker-entrypoint.sh (about)

     1  #!/bin/sh
     2  
     3  USER=abc
     4  
     5  echo "---Setup Timezone to ${TZ}---"
     6  echo "${TZ}" > /etc/timezone
     7  echo "---Checking if UID: ${UID} matches user---"
     8  usermod -o -u ${UID} ${USER}
     9  echo "---Checking if GID: ${GID} matches user---"
    10  groupmod -o -g ${GID} ${USER} > /dev/null 2>&1 ||:
    11  usermod -g ${GID} ${USER}
    12  echo "---Setting umask to ${UMASK}---"
    13  umask ${UMASK}
    14  
    15  echo "---Taking ownership of data...---"
    16  chown -R ${UID}:${GID} /app /data
    17  chmod +x /app/cqhttp
    18  
    19  echo "Starting..."
    20  su-exec ${USER} /app/cqhttp "$@"