diff options
Diffstat (limited to 'docker/cgit/docker-entrypoint.sh')
-rwxr-xr-x | docker/cgit/docker-entrypoint.sh | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/docker/cgit/docker-entrypoint.sh b/docker/cgit/docker-entrypoint.sh index 102d46c..6d632c0 100755 --- a/docker/cgit/docker-entrypoint.sh +++ b/docker/cgit/docker-entrypoint.sh @@ -1,13 +1,24 @@ -#!/bin/sh +#!/bin/bash if [ "${1}" = "init" ]; then + # setup apache + sed -i "s/ScriptAlias \/cgit\//ScriptAlias \//" /etc/apache2/conf-enabled/cgit.conf + sed -i "/RedirectMatch/d" /etc/apache2/conf-enabled/cgit.conf + ex -s -c $(grep -n "^Alias" /etc/apache2/conf-enabled/cgit.conf | cut -d ":" -f 1)m0 -c w -c q /etc/apache2/conf-enabled/cgit.conf + sed -i "s/\/usr\/share\/cgit/\/usr\/share\/cgit-docker/" /etc/apache2/conf-enabled/cgit.conf + service apache2 start - /docker-init.py + # populate assets + if [ ! $(ls -A /usr/share/cgit-docker) ]; then + cp /usr/share/cgit/* /usr/share/cgit-docker/ + fi - # TODO: https://git-scm.com/docs/gitweb#_generating_projects_list_using_gitweb + # run complex init + /docker-init.py + # loop tail -f /dev/null else exec "$@" |