diff options
Diffstat (limited to 'entrypoint.sh')
| -rwxr-xr-x | entrypoint.sh | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/entrypoint.sh b/entrypoint.sh index 11c2a7e..1072ba6 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -23,12 +23,14 @@ NGINX_WORKER_CONNECTIONS="${NGINX_WORKER_CONNECTIONS:-1024}" printf "\033[0m" setup() { +if [ -e /setup ] ; then return ; fi if [ "$(find /var/git -type f | wc -l)" -eq 0 ] ; then cp -r /var/default/git/* /var/git/ fi -addgroup -g "${CGIT_GID}" git +addgroup -g "${CGIT_GID}" git adduser -h /var/git --gecos "$FULL_NAME" -D -s "${CGIT_SHELL}" -u "${CGIT_UID}" -G git git + chown -R git:git /var/git passwd -u git @@ -38,6 +40,8 @@ if [ -n "$AUTHORIZED_KEYS" ] ; then mkdir -p /etc/ssh/keys echo "$AUTHORIZED_KEYS" | tee /etc/ssh/keys/git fi + +touch /setup } # exec runsvdir /var/service @@ -165,7 +169,6 @@ run_nginx run_cgit run_sshd - set +x # Bail out if a service stops, poll it every 30 seconds watchServices 30 |
