Reset existing Gitea bootstrap password
This commit is contained in:
parent
61db0ce277
commit
67d514bf59
9
jeannie
9
jeannie
|
|
@ -2971,7 +2971,14 @@ if ! sudo docker exec -u git "\${container_name}" gitea -c /data/gitea/conf/app.
|
|||
--email "\${bootstrap_email}" \
|
||||
--admin \
|
||||
--must-change-password=false >/tmp/homelab-gitea-user-create.log 2>&1; then
|
||||
if ! sudo docker exec -u git "\${container_name}" gitea -c /data/gitea/conf/app.ini admin user list | awk -v user="\${bootstrap_user}" 'NR > 1 && \$2 == user { found = 1 } END { exit found ? 0 : 1 }'; then
|
||||
if sudo docker exec -u git "\${container_name}" gitea -c /data/gitea/conf/app.ini admin user list | awk -v user="\${bootstrap_user}" 'NR > 1 && \$2 == user { found = 1 } END { exit found ? 0 : 1 }'; then
|
||||
sudo docker exec -u git "\${container_name}" gitea -c /data/gitea/conf/app.ini admin user change-password \
|
||||
--username "\${bootstrap_user}" \
|
||||
--password "\${bootstrap_password}" >/tmp/homelab-gitea-user-password.log 2>&1 || {
|
||||
cat /tmp/homelab-gitea-user-password.log >&2
|
||||
exit 1
|
||||
}
|
||||
else
|
||||
cat /tmp/homelab-gitea-user-create.log >&2
|
||||
exit 1
|
||||
fi
|
||||
|
|
|
|||
Loading…
Reference in New Issue