mirror of
https://github.com/micromdm/micromdm/
synced 2026-08-10 19:46:07 +08:00
Added SetRecoveryLock support (#757)
This commit is contained in:
18
tools/api/commands/set_firmware_password
Normal file
18
tools/api/commands/set_firmware_password
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
source $MICROMDM_ENV_PATH
|
||||
endpoint="v1/commands"
|
||||
jq -n \
|
||||
--arg request_type "SetFirmwarePassword" \
|
||||
--arg udid "$1" \
|
||||
--arg current_password $2 \
|
||||
--arg new_password $3 \
|
||||
--arg request_requires_network_tether $4 \
|
||||
--arg allow_oroms $5 \
|
||||
'.udid = $udid
|
||||
|.current_password = $current_password
|
||||
|.new_password = $new_password
|
||||
|.request_requires_network_tether = $request_requires_network_tether
|
||||
|.allow_oroms = $allow_oroms
|
||||
|.request_type = $request_type
|
||||
'|\
|
||||
curl $CURL_OPTS -K <(cat <<< "-u micromdm:$API_TOKEN") "$SERVER_URL/$endpoint" -d@-
|
||||
18
tools/api/commands/set_recovery_lock
Normal file
18
tools/api/commands/set_recovery_lock
Normal file
@@ -0,0 +1,18 @@
|
||||
#!/bin/bash
|
||||
source $MICROMDM_ENV_PATH
|
||||
endpoint="v1/commands"
|
||||
jq -n \
|
||||
--arg request_type "SetRecoveryLock" \
|
||||
--arg udid "$1" \
|
||||
--arg current_password $2 \
|
||||
--arg new_password $3 \
|
||||
--arg request_requires_network_tether $4 \
|
||||
--arg allow_oroms $5 \
|
||||
'.udid = $udid
|
||||
|.current_password = $current_password
|
||||
|.new_password = $new_password
|
||||
|.request_requires_network_tether = $request_requires_network_tether
|
||||
|.allow_oroms = $allow_oroms
|
||||
|.request_type = $request_type
|
||||
'|\
|
||||
curl $CURL_OPTS -K <(cat <<< "-u micromdm:$API_TOKEN") "$SERVER_URL/$endpoint" -d@-
|
||||
15
tools/api/commands/verify_firmware_password
Normal file
15
tools/api/commands/verify_firmware_password
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
source $MICROMDM_ENV_PATH
|
||||
endpoint="v1/commands"
|
||||
jq -n \
|
||||
--arg request_type "VerifyFirmwarePassword" \
|
||||
--arg udid "$1" \
|
||||
--arg password $2 \
|
||||
--arg request_requires_network_tether $3 \
|
||||
--arg allow_oroms $4 \
|
||||
'.udid = $udid
|
||||
|.password = $current_password
|
||||
|.request_requires_network_tether = $request_requires_network_tether
|
||||
|.request_type = $request_type
|
||||
'|\
|
||||
curl $CURL_OPTS -K <(cat <<< "-u micromdm:$API_TOKEN") "$SERVER_URL/$endpoint" -d@-
|
||||
15
tools/api/commands/verify_recovery_lock
Normal file
15
tools/api/commands/verify_recovery_lock
Normal file
@@ -0,0 +1,15 @@
|
||||
#!/bin/bash
|
||||
source $MICROMDM_ENV_PATH
|
||||
endpoint="v1/commands"
|
||||
jq -n \
|
||||
--arg request_type "VerifyRecoveryLock" \
|
||||
--arg udid "$1" \
|
||||
--arg password $2 \
|
||||
--arg request_requires_network_tether $3 \
|
||||
--arg allow_oroms $4 \
|
||||
'.udid = $udid
|
||||
|.password = $current_password
|
||||
|.request_requires_network_tether = $request_requires_network_tether
|
||||
|.request_type = $request_type
|
||||
'|\
|
||||
curl $CURL_OPTS -K <(cat <<< "-u micromdm:$API_TOKEN") "$SERVER_URL/$endpoint" -d@-
|
||||
Reference in New Issue
Block a user