diff --git a/pretemplate/01-gitea-init b/pretemplate/01-gitea-init index fd97898..4e88767 100755 --- a/pretemplate/01-gitea-init +++ b/pretemplate/01-gitea-init @@ -47,6 +47,7 @@ fi if [[ ! -d ${APPDIR} ]] then mkdir -p ${APPDIR} + chown ${USER}:${GROUP} ${APPDIR} -R fi # Create app user and group @@ -70,6 +71,7 @@ chmod 770 ${APPCONFDIR} if [[ ! -d ${APPBINDIR} ]] then mkdir -p ${APPBINDIR} + chown ${USER}:${GROUP} ${APPBINDIR} fi cd $APPBINDIR diff --git a/systemd/forge.service b/systemd/forge.service index 1e1a48c..dd1c87f 100644 --- a/systemd/forge.service +++ b/systemd/forge.service @@ -15,7 +15,7 @@ Type=simple User=git Group=gitservice WorkingDirectory=/srv/forge/gitea/bin/ -ExecStart=/srv/forge/gitea/bin/gitea web +ExecStart=/srv/forge/gitea/bin/gitea web -c /etc/gitea/conf/app.ini Restart=always Environment=USER=git HOME=/srv/forge/git #CapabilityBoundingSet=CAP_NET_BIND_SERVICE