diff --git a/README.md b/README.md index 4c27d268..337f9791 100644 --- a/README.md +++ b/README.md @@ -5,8 +5,8 @@ Latest Skynet Webportal setup documentation and the setup process Skynet Labs supports is located at https://docs.siasky.net/webportal-management/overview. -Some of the scripts and setup documentation contained in this repository -(`skynet-webportal`) can be outdated and generally should not be used. +Some scripts and setup documentation contained in this repository +(`skynet-webportal`) may be outdated and generally should not be used. ## Web application @@ -35,7 +35,7 @@ For the purposes of complying with our code license, you can use the following S `fb6c9320bc7e01fbb9cd8d8c3caaa371386928793c736837832e634aaaa484650a3177d6714a` ## Running a Portal -For those interested in running a Webportal, head over to our developer docs [here](https://docs.siasky.net/webportal-management/overview.) to learn more. +For those interested in running a Webportal, head over to our developer docs [here](https://portal-docs.skynetlabs.com/) to learn more. ## Contributing diff --git a/scripts/portal-down.sh b/scripts/portal-down.sh index 0b42b53a..476ce837 100755 --- a/scripts/portal-down.sh +++ b/scripts/portal-down.sh @@ -2,16 +2,22 @@ set -e # exit on first error -while getopts d:t: flag +while getopts d:t:r: flag do case "${flag}" in d) delay=${OPTARG};; t) timeout=${OPTARG};; + r) reason=${OPTARG};; esac done delay=${delay:-0} # default to no delay timeout=${timeout:-300} # default timeout is 300s +if [[ -z $reason ]]; then + echo "Please provide a reason for disabling the portal (use '-r ')." + exit 1 +fi + countdown() { local secs=$1 while [ $secs -gt 0 ]; do @@ -24,8 +30,8 @@ countdown() { # delay disabling the portal countdown $delay -# stop healh-check so the server is taken our of load balancer -docker exec health-check cli/disable +# stop health-check so the server is taken our of load balancer +docker exec health-check cli disable $reason # then wait 5 minutes for the load balancer to propagate the dns records countdown $timeout diff --git a/scripts/portal-up.sh b/scripts/portal-up.sh index 1a287f2f..fcd7fe80 100755 --- a/scripts/portal-up.sh +++ b/scripts/portal-up.sh @@ -3,4 +3,4 @@ set -e # exit on first error # start the health-checks service -docker exec health-check cli/enable +docker exec health-check cli enable