mirror of
https://codeberg.org/SeedDMS/paperless
synced 2024-11-26 15:32:08 +00:00
login and password can be passed as command line parameters
This commit is contained in:
parent
45af226bca
commit
62d6ab86c5
|
@ -2,7 +2,16 @@
|
||||||
|
|
||||||
. ./credentials
|
. ./credentials
|
||||||
|
|
||||||
|
USERNAME="admin"
|
||||||
|
if [ -n "$1" ]; then
|
||||||
|
USERNAME=$1
|
||||||
|
fi
|
||||||
|
PASSWORD="admin"
|
||||||
|
if [ -n "$2" ]; then
|
||||||
|
PASSWORD=$2
|
||||||
|
fi
|
||||||
|
JSON="{\"username\":\"$USERNAME\",\"password\":\"$PASSWORD\"}"
|
||||||
curl --silent -X POST "${URL}/api/token/" \
|
curl --silent -X POST "${URL}/api/token/" \
|
||||||
-H 'Content-Type: application/json' \
|
-H 'Content-Type: application/json' \
|
||||||
-d '{"username":"admin","password":"admin"}' | jq '.'
|
-d $JSON | jq '.'
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user