You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
684 B
20 lines
684 B
#!/bin/sh
|
|
|
|
|
|
while ! mariadb -hmariadb -u$GITEA_DATABASE_USR -p$GITEA_DATABASE_PWD $GITEA_DATABASE_NAME &>/dev/null; do
|
|
echo "Gitea waiting db..."
|
|
sleep 5
|
|
done
|
|
|
|
if [ ! -f "app.ini.bak" ]; then
|
|
echo "Initializing gitea..."
|
|
mv app.ini app.ini.bak
|
|
cp /tmp/app.ini .
|
|
sed -i "/NAME .*/c\NAME = $GITEA_DATABASE_NAME" app.ini
|
|
sed -i "/USER .*/c\USER = $GITEA_DATABASE_USR" app.ini
|
|
sed -i "/PASSWD .*/c\PASSWD = $GITEA_DATABASE_PWD" app.ini
|
|
gitea migrate
|
|
gitea admin user create --username $GITEA_ADMIN_USR --password $GITEA_ADMIN_PWD --email $GITEA_ADMIN_MAIL --admin
|
|
fi
|
|
echo "Launching gitea on localhost:3000"
|
|
gitea web --config /etc/gitea/app.ini &> /dev/null
|
|
|