File tree Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Expand file tree Collapse file tree 1 file changed +15
-0
lines changed Original file line number Diff line number Diff line change @@ -7,6 +7,14 @@ if [ "${USER}" != "git" ]; then
7
7
sed -i -e " s/AllowUsers git$/AllowUsers ${USER} /g" /etc/ssh/sshd_config
8
8
fi
9
9
10
+ if [ -z " ${USER_GID} " ]; then
11
+ USER_GID=" ` id -g ${USER} ` "
12
+ fi
13
+
14
+ if [ -z " ${USER_UID} " ]; then
15
+ USER_UID=" ` id -u ${USER} ` "
16
+ fi
17
+
10
18
# # Change GID for USER?
11
19
if [ -n " ${USER_GID} " ] && [ " ${USER_GID} " != " ` id -g ${USER} ` " ]; then
12
20
sed -i -e " s/^${USER} :\([^:]*\):[0-9]*/${USER} :\1:${USER_GID} /" /etc/group
@@ -22,6 +30,13 @@ for FOLDER in /data/gitea/conf /data/gitea/log /data/git /data/ssh; do
22
30
mkdir -p ${FOLDER}
23
31
done
24
32
33
+ if [ -f /data/gitea/conf/app.ini ]; then
34
+ echo " Found app.ini config file, migrating database"
35
+ chmod 644 /data/gitea/conf/app.ini
36
+ chown -R ${USER_UID} :${USER_GID} /data/git /data/gitea
37
+ su - ${USER} -c gitea migrate -c /data/gitea/conf/app.ini
38
+ fi
39
+
25
40
if [ $# -gt 0 ]; then
26
41
exec " $@ "
27
42
else
You can’t perform that action at this time.
0 commit comments