feat: add set_user_pass function
Some checks reported errors
continuous-integration/drone/push Build was killed
Some checks reported errors
continuous-integration/drone/push Build was killed
This commit is contained in:
12
abra.sh
12
abra.sh
@ -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)
|
||||
|
||||
Reference in New Issue
Block a user