mirror of
https://github.com/micromdm/micromdm/
synced 2026-08-12 13:25:38 +08:00
mdm: add SetBootstrapToken command.
This commit is contained in:
12
tools/api/commands/set_bootstrap_token
Executable file
12
tools/api/commands/set_bootstrap_token
Executable file
@@ -0,0 +1,12 @@
|
||||
#!/bin/bash
|
||||
source $MICROMDM_ENV_PATH
|
||||
endpoint="v1/commands"
|
||||
jq -n \
|
||||
--arg request_type "SetBootstrapToken" \
|
||||
--arg udid "$1" \
|
||||
--arg token "$2" \
|
||||
'.udid = $udid
|
||||
|.request_type = $request_type
|
||||
|.bootstrap_token = $token
|
||||
'|\
|
||||
curl $CURL_OPTS -u "micromdm:$API_TOKEN" "$SERVER_URL/$endpoint" -d@-
|
||||
Reference in New Issue
Block a user