feat: add set_user_pass function
Some checks reported errors
continuous-integration/drone/push Build was killed

This commit is contained in:
2025-11-25 16:47:59 +01:00
parent 5b5fd5cb2e
commit c3065eee54

12
abra.sh
View File

@ -81,6 +81,18 @@ with open('/tmp/$1', newline='') as file:
""" 2>&1 | quieten
}
set_user_pass() {
username="$1"
password="$2"
/manage.py shell -c """
user = User.objects.get(username='$username')
user.set_password('$password')
user.save()
print('Changed $username password')
""" 2>&1 | quieten
}
set_admin_pass() {
password=$(cat /run/secrets/admin_pass)
token=$(cat /run/secrets/admin_token)