Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 9 additions & 1 deletion contents/functions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,14 @@ if [ -n $RD_CONFIG_BACKUP_API_URL ] ; then
USE_BACKUP_URL=true
fi

#Force HTTPS
if [ "${RD_CONFIG_API_URL:0:7}" = "http://" ] ; then
RD_CONFIG_API_URL="https://${RD_CONFIG_API_URL:7}"
fi
if [ "${RD_CONFIG_BACKUP_API_URL:0:7}" = "http://" ] ; then
RD_CONFIG_BACKUP_API_URL="https://${RD_CONFIG_BACKUP_API_URL:7}"
fi

#Usage get_curl API_URL
get_curl () {
METHOD="-X GET"
Expand Down Expand Up @@ -129,4 +137,4 @@ put_server_up () {
else
echo "Server state is \"$NEW_SERVER_STATE\""
fi
}
}