#!/usr/bin/env bash set -o errexit set -o nounset set -o pipefail # Create the home directory. if ! [ -d {{ .Forgejo.Home }} ]; then mkdir -p {{ .Forgejo.Home }} chmod 0700 {{ .Forgejo.Home }} fi # Create the custom directory. if ! [ -d {{ .Forgejo.Custom }} ]; then mkdir -p {{ .Forgejo.Custom }} chmod 0500 {{ .Forgejo.Custom }} fi if [ $# -gt 0 ]; then exec "$@" else exec {{ .Forgejo.Bin }} -c {{ .Forgejo.AppIni }} web fi