Skip to content

Commit

Permalink
Cleanup fa-screenshot.sh
Browse files Browse the repository at this point in the history
Add setup token docs with new screenshots
  • Loading branch information
mmanes committed Jun 21, 2024
1 parent e481559 commit 264fd7b
Show file tree
Hide file tree
Showing 9 changed files with 24 additions and 39 deletions.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions astro/src/content/docs/get-started/run-in-the-cloud/cloud.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -220,6 +220,14 @@ When the deployment is ready, the link to your deployment will be live and the <

Log in to the deployment's administrative user interface by clicking on the deployment's URL, such as `https://piedpiper-dev-ha-may.fusionauth.io`.

In order to ensure that only authorized users can setup your new deployment, a Setup Token is required to proceed. If you
navigate directly to the deployment URL, you will be prompted to enter the 8-character Setup Token as displayed on the deployment
management page.

If you access the deployment through the provided URL link, the Setup Token is automatically submitted and will bypass this screen.

<img src="/img/docs/get-started/run-in-the-cloud/setup-token-entry.png" alt="Deployment tab when the provisioning finished." width="1200" role="bottom-cropped" />

At that point the [Setup Wizard](/docs/get-started/run-in-the-cloud/setup-wizard) will begin.
You can configure FusionAuth by creating API keys, adding additional users, setting up applications for your users to log in to, or any other task.
The interface will be exactly the same as a self hosted FusionAuth instance.
Expand Down
55 changes: 16 additions & 39 deletions src/fa-screenshot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,20 +14,6 @@ function printFileAttribs() {
printOut "Current size of the screenshot is : "`echo ${attributes} | cut -d' ' -f7`
}

function compressUsingTinyPNG() {
echo "-- Using TinyPNG for compression"

API_KEY=`printenv | grep TINYPNG_API_KEY | awk -F '=' '{print $2}'`
if [ "${API_KEY}" == "" ]; then
echo "Error : TinyPNG API key not found in environment. Not continuing. Please set TINYPNG_API_KEY".
exit 1
else
compressedFile=`curl -s --user api:${API_KEY} --data-binary @${absFile} -i https://api.tinify.com/shrink | grep -i location | awk '{print $2}' | sed 's/.$//'`
printOut "-- Downloading from TinyPNG : ${compressedFile}"
curl -s -X GET "${compressedFile}" --output ${absFile}
fi
}

function printOut() {
if [ ${verbose} == "yes" ]; then
echo
Expand All @@ -53,19 +39,15 @@ HELP_USAGE
}

verbose="no"
useTP="no"
filename=`date +'%y%m%d-%H%M%S'`
destination=""
xAxis=640
url=""
while getopts ":stx:f:u:d:h" options; do
while getopts ":vx:f:u:d:h" options; do
case "${options}" in
v)
verbose="yes"
;;
t)
useTP="yes"
;;
x)
xAxis=${OPTARG}
;;
Expand Down Expand Up @@ -104,21 +86,12 @@ else
printOut "imagemagick is installed"
fi

printOut "-- Checking whether pngquant is installed"
which -s pngquant
status=$?
if [ $status -eq 1 ]; then
echo "Installing pngquant"
brew install pngquant
else
printOut "pngquant is installed"
fi

if [ `defaults read "Apple Global Domain" AppleReduceDesktopTinting` == "0" ]; then
echo "Window will not have a gray background."
echo "Go to System Setting -> Appearance"
echo "And disable 'Allow wallpaper tinting in windows'"
exit 1;
if [ $(defaults read "Apple Global Domain" AppleReduceDesktopTinting 2>/dev/null || echo -n 0) == "0" ]; then
echo "Disabling wallpaper tinting in windows to get a consistent gray background."
echo "To revert this change, execute 'defaults write \"Apple Global Domain\" AppleReduceDesktopTinting 0'"
echo "or go to System Settings -> Appearance and enable 'Allow wallpaper tinting in windows'."
defaults write "Apple Global Domain" AppleReduceDesktopTinting 1
fi


Expand Down Expand Up @@ -163,6 +136,14 @@ tell application theApp
end tell
EOD

osaret=$?

if [ $osaret != 0 ]; then
echo "osascript failed. Check permissions under System Settings -> Privacy & Security for both Accessibility and Automation."
exit 1
fi


if [ "x$url" != "x" ]; then
osascript<<EOD
tell application "Safari" to set the URL of the front document to "$url"
Expand Down Expand Up @@ -190,14 +171,10 @@ printOut "-- Checking image properties"
printFileAttribs

printOut "-- Resizing screenshot"
convert=`which convert`
$convert -geometry 1600x ${absFile} ${absFile}

printOut "-- Compressing png"
compressUsingTinyPNG
magick=`which magick`
$magick ${absFile} -geometry 1600x ${absFile}

# move to destination folder
if [ "${destination}" != "" ]; then
mv ${absFile} ${destination}/${filename}
fi

0 comments on commit 264fd7b

Please sign in to comment.