From 8619edb520e851934bd5396b24d7cc7f2d4d69a8 Mon Sep 17 00:00:00 2001 From: Philippe Caseiro Date: Tue, 30 Oct 2018 15:22:45 +0100 Subject: [PATCH] Updating init script and systemd configuration --- pretemplate/01-gitea-init | 2 ++ systemd/forge.service | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) 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