mirror of
https://github.com/micromdm/micromdm/
synced 2026-08-07 18:15:47 +08:00
Allow setting curl options in environment variable (#455)
This commit is contained in:
committed by
Victor Vrantchan
parent
9f60f7baca
commit
8f5838ceea
@@ -7,4 +7,4 @@ jq -n \
|
||||
'.udid = $udid
|
||||
|.request_type = $request_type
|
||||
'|\
|
||||
curl -u "micromdm:$API_TOKEN" "$SERVER_URL/$endpoint" -d@-
|
||||
curl $CURL_OPTS -u "micromdm:$API_TOKEN" "$SERVER_URL/$endpoint" -d@-
|
||||
|
||||
@@ -7,4 +7,4 @@ jq -n \
|
||||
'.udid = $udid
|
||||
|.request_type = $request_type
|
||||
'|\
|
||||
curl -u "micromdm:$API_TOKEN" "$SERVER_URL/$endpoint" -d@-
|
||||
curl $CURL_OPTS -u "micromdm:$API_TOKEN" "$SERVER_URL/$endpoint" -d@-
|
||||
|
||||
@@ -7,4 +7,4 @@ jq -n \
|
||||
'.udid = $udid
|
||||
|.request_type = $request_type
|
||||
'|\
|
||||
curl -u "micromdm:$API_TOKEN" "$SERVER_URL/$endpoint" -d@-
|
||||
curl $CURL_OPTS -u "micromdm:$API_TOKEN" "$SERVER_URL/$endpoint" -d@-
|
||||
|
||||
@@ -9,4 +9,4 @@ jq -n \
|
||||
|.pin = $pin
|
||||
|.request_type = $request_type
|
||||
'|\
|
||||
curl -u "micromdm:$API_TOKEN" "$SERVER_URL/$endpoint" -d@-
|
||||
curl $CURL_OPTS -u "micromdm:$API_TOKEN" "$SERVER_URL/$endpoint" -d@-
|
||||
|
||||
@@ -9,6 +9,6 @@ jq -n \
|
||||
|.request_type = $request_type
|
||||
|.manifest_url = $manifest_url
|
||||
'|\
|
||||
curl \
|
||||
curl $CURL_OPTS \
|
||||
-H "Content-Type: application/json" \
|
||||
-u "micromdm:$API_TOKEN" "$SERVER_URL/$endpoint" -d@-
|
||||
|
||||
@@ -9,6 +9,6 @@ jq -n \
|
||||
|.request_type = $request_type
|
||||
|.manifest_url = $manifest_url
|
||||
'|\
|
||||
curl \
|
||||
curl $CURL_OPTS \
|
||||
-H "Content-Type: application/json" \
|
||||
-u "micromdm:$API_TOKEN" "$SERVER_URL/$endpoint" -d@-
|
||||
|
||||
@@ -9,4 +9,4 @@ jq -n \
|
||||
|.payload = $payload
|
||||
|.request_type = $request_type
|
||||
'|\
|
||||
curl -u "micromdm:$API_TOKEN" "$SERVER_URL/$endpoint" -d@-
|
||||
curl $CURL_OPTS -u "micromdm:$API_TOKEN" "$SERVER_URL/$endpoint" -d@-
|
||||
|
||||
@@ -9,4 +9,4 @@ jq -n \
|
||||
|.provisioning_profile = $provisioning_profile
|
||||
|.request_type = $request_type
|
||||
'|\
|
||||
curl -u "micromdm:$API_TOKEN" "$SERVER_URL/$endpoint" -d@-
|
||||
curl $CURL_OPTS -u "micromdm:$API_TOKEN" "$SERVER_URL/$endpoint" -d@-
|
||||
|
||||
@@ -7,4 +7,4 @@ jq -n \
|
||||
'.udid = $udid
|
||||
|.request_type = $request_type
|
||||
'|\
|
||||
curl -u "micromdm:$API_TOKEN" "$SERVER_URL/$endpoint" -d@-
|
||||
curl $CURL_OPTS -u "micromdm:$API_TOKEN" "$SERVER_URL/$endpoint" -d@-
|
||||
|
||||
@@ -7,4 +7,4 @@ jq -n \
|
||||
'.udid = $udid
|
||||
|.request_type = $request_type
|
||||
'|\
|
||||
curl -u "micromdm:$API_TOKEN" "$SERVER_URL/$endpoint" -d@-
|
||||
curl $CURL_OPTS -u "micromdm:$API_TOKEN" "$SERVER_URL/$endpoint" -d@-
|
||||
|
||||
@@ -7,6 +7,6 @@ jq -n \
|
||||
'.udid = $udid
|
||||
|.request_type = $request_type
|
||||
'|\
|
||||
curl \
|
||||
curl $CURL_OPTS \
|
||||
-H "Content-Type: application/json" \
|
||||
-u "micromdm:$API_TOKEN" "$SERVER_URL/$endpoint" -d@-
|
||||
|
||||
@@ -7,4 +7,4 @@ jq -n \
|
||||
'.udid = $udid
|
||||
|.request_type = $request_type
|
||||
'|\
|
||||
curl -u "micromdm:$API_TOKEN" "$SERVER_URL/$endpoint" -d@-
|
||||
curl $CURL_OPTS -u "micromdm:$API_TOKEN" "$SERVER_URL/$endpoint" -d@-
|
||||
|
||||
@@ -9,4 +9,4 @@ jq -n \
|
||||
|.identifier = $identifier
|
||||
|.request_type = $request_type
|
||||
'|\
|
||||
curl -u "micromdm:$API_TOKEN" "$SERVER_URL/$endpoint" -d@-
|
||||
curl $CURL_OPTS -u "micromdm:$API_TOKEN" "$SERVER_URL/$endpoint" -d@-
|
||||
|
||||
@@ -9,4 +9,4 @@ jq -n \
|
||||
|.uuid = $uuid
|
||||
|.request_type = $request_type
|
||||
'|\
|
||||
curl -u "micromdm:$API_TOKEN" "$SERVER_URL/$endpoint" -d@-
|
||||
curl $CURL_OPTS -u "micromdm:$API_TOKEN" "$SERVER_URL/$endpoint" -d@-
|
||||
|
||||
@@ -7,4 +7,4 @@ jq -n \
|
||||
'.udid = $udid
|
||||
|.request_type = $request_type
|
||||
'|\
|
||||
curl -u "micromdm:$API_TOKEN" "$SERVER_URL/$endpoint" -d@-
|
||||
curl $CURL_OPTS -u "micromdm:$API_TOKEN" "$SERVER_URL/$endpoint" -d@-
|
||||
|
||||
@@ -13,4 +13,4 @@ jq -n \
|
||||
|.install_action = $install_action
|
||||
]
|
||||
'|\
|
||||
curl -u "micromdm:$API_TOKEN" "$SERVER_URL/$endpoint" -d@-
|
||||
curl $CURL_OPTS -u "micromdm:$API_TOKEN" "$SERVER_URL/$endpoint" -d@-
|
||||
|
||||
@@ -9,4 +9,4 @@ jq -n \
|
||||
|.request_type = $request_type
|
||||
|.force = $force
|
||||
'|\
|
||||
curl -u "micromdm:$API_TOKEN" "$SERVER_URL/$endpoint" -d@-
|
||||
curl $CURL_OPTS -u "micromdm:$API_TOKEN" "$SERVER_URL/$endpoint" -d@-
|
||||
|
||||
@@ -7,4 +7,4 @@ jq -n \
|
||||
'.udid = $udid
|
||||
|.request_type = $request_type
|
||||
'|\
|
||||
curl -u "micromdm:$API_TOKEN" "$SERVER_URL/$endpoint" -d@-
|
||||
curl $CURL_OPTS -u "micromdm:$API_TOKEN" "$SERVER_URL/$endpoint" -d@-
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#!/bin/bash
|
||||
source $MICROMDM_ENV_PATH
|
||||
endpoint="v1/devices"
|
||||
curl -s -u "micromdm:$API_TOKEN" "$SERVER_URL/$endpoint"
|
||||
curl $CURL_OPTS -XGET --data-binary {} -s -u "micromdm:$API_TOKEN" "$SERVER_URL/$endpoint"
|
||||
|
||||
@@ -2,4 +2,4 @@
|
||||
|
||||
source $MICROMDM_ENV_PATH
|
||||
endpoint="push"
|
||||
curl -u "micromdm:$API_TOKEN" "$SERVER_URL/$endpoint/$1"
|
||||
curl $CURL_OPTS -u "micromdm:$API_TOKEN" "$SERVER_URL/$endpoint/$1"
|
||||
|
||||
Reference in New Issue
Block a user