mirror of
https://github.com/micromdm/micromdm/
synced 2026-08-07 18:15:47 +08:00
adding a script to install VPP apps (#865)
This commit is contained in:
17
tools/api/commands/install_vpp_application
Normal file
17
tools/api/commands/install_vpp_application
Normal file
@@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
# Install VPP application on device
|
||||
# VPP app needs to be registered with the device serial number using the apple endpoint (https://vpp.itunes.apple.com/mdm/v2/assets/associate) before one can install it on a device
|
||||
source $MICROMDM_ENV_PATH
|
||||
endpoint="v1/commands"
|
||||
jq -n \
|
||||
--arg request_type "InstallApplication" \
|
||||
--arg udid "$1" \
|
||||
--arg itunes_store_id $2 \
|
||||
'.udid = $udid
|
||||
|.request_type = $request_type
|
||||
|.itunes_store_id = ($itunes_store_id|tonumber)
|
||||
|.options = {"purchase_method": 1}
|
||||
'|\
|
||||
curl $CURL_OPTS \
|
||||
-H "Content-Type: application/json" \
|
||||
-K <(cat <<< "-u micromdm:$API_TOKEN") "$SERVER_URL/$endpoint" -d@-
|
||||
Reference in New Issue
Block a user