@@ -266,7 +266,7 @@ _mktemp() {
|
|||||||
get_my_ip() {
|
get_my_ip() {
|
||||||
declare api_response api_status api_status_message my_ip
|
declare api_response api_status api_status_message my_ip
|
||||||
|
|
||||||
api_response=$( curl -f "$cfg_service_url/ip.json" )
|
api_response=$( curl "$cfg_service_url/ip.json" )
|
||||||
(( $? )) && {
|
(( $? )) && {
|
||||||
err "Failed to get a response from the API, folding."
|
err "Failed to get a response from the API, folding."
|
||||||
return 1
|
return 1
|
||||||
@@ -313,7 +313,7 @@ get_token() {
|
|||||||
read -sp 'Password: ' password
|
read -sp 'Password: ' password
|
||||||
printf '\n'
|
printf '\n'
|
||||||
|
|
||||||
login_response=$(curl -f -c "$cfg_file.cookiejar" -d "login=$login" -d "password=$password" -sl "$cfg_service_url/login.json")
|
login_response=$(curl -c "$cfg_file.cookiejar" -d "login=$login" -d "password=$password" -sl "$cfg_service_url/login.json")
|
||||||
(( $? )) && {
|
(( $? )) && {
|
||||||
err "Login failed."
|
err "Login failed."
|
||||||
return 1
|
return 1
|
||||||
|
|||||||
Reference in New Issue
Block a user