mirror of
https://github.com/micromdm/micromdm/
synced 2026-08-05 08:55:51 +08:00
13 lines
345 B
Bash
Executable File
13 lines
345 B
Bash
Executable File
#!/bin/bash
|
|
source $MICROMDM_ENV_PATH
|
|
endpoint="v1/commands"
|
|
jq -n \
|
|
--arg request_type "InstallProfile" \
|
|
--arg udid "$1" \
|
|
--arg payload "$(cat "$2"|openssl base64 -A)" \
|
|
'.udid = $udid
|
|
|.payload = $payload
|
|
|.request_type = $request_type
|
|
'|\
|
|
curl $CURL_OPTS -K <(cat <<< "-u micromdm:$API_TOKEN") "$SERVER_URL/$endpoint" -d@-
|