#!/bin/sh

# Whe cd here, because builtin SSH won't run without.
cd /var/lib/gitea

# The USER variable is needed here because gitea doesn't actually
# check what user its running as, it instead grabs the USER variable
# from the environment.  HOME is set for the same reasons.
USER=_gitea HOME=/var/lib/gitea GITEA_WORK_DIR=$HOME exec chpst -u _gitea:_gitea gitea web --config /etc/gitea.conf
