File tree Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Expand file tree Collapse file tree 2 files changed +10
-6
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -6,12 +6,16 @@ if [ ! -d /data/git/.ssh ]; then
6
6
fi
7
7
8
8
if [ ! -f /data/git/.ssh/environment ]; then
9
- echo " GITEA_CUSTOM=/data/gitea " > | /data/git/.ssh/environment
9
+ echo " GITEA_CUSTOM=$GITEA_CUSTOM " > | /data/git/.ssh/environment
10
10
chmod 600 /data/git/.ssh/environment
11
+
12
+ elif ! grep -q " ^GITEA_CUSTOM=$GITEA_CUSTOM $" /data/git/.ssh/environment; then
13
+ sed -i /^GITEA_CUSTOM=/d /data/git/.ssh/environment
14
+ echo " GITEA_CUSTOM=$GITEA_CUSTOM " >> /data/git/.ssh/environment
11
15
fi
12
16
13
- if [ ! -f /data/gitea /conf/app.ini ]; then
14
- mkdir -p /data/gitea /conf
17
+ if [ ! -f ${GITEA_CUSTOM} /conf/app.ini ]; then
18
+ mkdir -p ${GITEA_CUSTOM} /conf
15
19
16
20
# Set INSTALL_LOCK to true only if SECRET_KEY is not empty and
17
21
# INSTALL_LOCK is empty
@@ -36,7 +40,9 @@ if [ ! -f /data/gitea/conf/app.ini ]; then
36
40
DISABLE_REGISTRATION=${DISABLE_REGISTRATION:- " false" } \
37
41
REQUIRE_SIGNIN_VIEW=${REQUIRE_SIGNIN_VIEW:- " false" } \
38
42
SECRET_KEY=${SECRET_KEY:- " " } \
39
- envsubst < /etc/templates/app.ini > /data/gitea/conf/app.ini
43
+ envsubst < /etc/templates/app.ini > ${GITEA_CUSTOM} /conf/app.ini
44
+
45
+ chown ${USER} :git ${GITEA_CUSTOM} /conf/app.ini
40
46
fi
41
47
42
48
# only chown if current owner is not already the gitea ${USER}. No recursive check to save time
You can’t perform that action at this time.
0 commit comments