mirror of
https://github.com/Websoft9/websoft9.git
synced 2025-01-23 17:40:35 +08:00
gitea setup fixed
This commit is contained in:
parent
1cbd60e546
commit
d5d0850bea
@ -1,4 +1,4 @@
|
||||
# Dockerfile refer to:https://github.com/go-gitea/gitea/blob/main/Dockerfile
|
||||
# Dockerfile refer to: https://github.com/go-gitea/gitea/blob/main/Dockerfile
|
||||
FROM gitea/gitea:1.20.4
|
||||
|
||||
LABEL maintainer="Websoft9<help@websoft9.com>"
|
||||
|
@ -39,10 +39,11 @@ su -c "
|
||||
|
||||
echo "Read credential from tmp"
|
||||
username=$(grep -o "New user '[^']*" /tmp/credential | sed "s/New user '//")
|
||||
if [ -z "$username" ]; then
|
||||
username="websoft9"
|
||||
if [ -z "$username" ] || [ "$username" != "websoft9" ]; then
|
||||
echo "username is not websoft9, exit"
|
||||
fi
|
||||
password=$(grep -o "generated random password is '[^']*" /tmp/credential | sed "s/generated random password is '//")
|
||||
rm -rf /tmp/credential
|
||||
|
||||
echo "Save to credential"
|
||||
json="{\"username\":\"$admin_username\",\"password\":\"$password\",\"email\":\"$admin_email\"}"
|
||||
|
Loading…
Reference in New Issue
Block a user