@@ -278,6 +278,8 @@ get_token() {
|
|||||||
|
|
||||||
if get_api_status <<< "$api_response"; then
|
if get_api_status <<< "$api_response"; then
|
||||||
secret=$(jq -r '.data.token' <<< "$api_response")
|
secret=$(jq -r '.data.token' <<< "$api_response")
|
||||||
|
[[ $secret ]] || return 1
|
||||||
|
|
||||||
printf 'export secret="%s"' "$secret" >> "$cfg_file"
|
printf 'export secret="%s"' "$secret" >> "$cfg_file"
|
||||||
chmod 600 "$cfg_file"
|
chmod 600 "$cfg_file"
|
||||||
printf 'Done\n'
|
printf 'Done\n'
|
||||||
|
|||||||
Reference in New Issue
Block a user