diff options
Diffstat (limited to 'entrypoint.sh')
| -rwxr-xr-x | entrypoint.sh | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/entrypoint.sh b/entrypoint.sh index 1072ba6..16ec682 100755 --- a/entrypoint.sh +++ b/entrypoint.sh @@ -22,6 +22,7 @@ NGINX_WORKER_CONNECTIONS="${NGINX_WORKER_CONNECTIONS:-1024}" printf "\033[0m" +# This is only run once in the container's lifetime unless /setup is removed setup() { if [ -e /setup ] ; then return ; fi if [ "$(find /var/git -type f | wc -l)" -eq 0 ] ; then @@ -30,10 +31,7 @@ fi 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 - addgroup nginx git if [ -n "$AUTHORIZED_KEYS" ] ; then @@ -44,9 +42,6 @@ fi touch /setup } -# exec runsvdir /var/service -# /var/service/nginx/run & - run_nginx() { cat > /etc/nginx/nginx.conf <<NGINX worker_processes $NGINX_WORKER_PROCESSES; @@ -128,7 +123,6 @@ umask 007 su git -c "fcgiwrap -f -c$CGIT_THREADS -s \"unix:$socket\" &" } - run_sshd() { if [ -d "$SSH_HOST_KEY_DIR" ] ; then cp -v "$SSH_HOST_KEY_DIR"/* /etc/ssh/ || echo "" @@ -163,8 +157,8 @@ while true ; do done } - setup +chown -R git:git /var/git run_nginx run_cgit run_sshd |
