
curl -X POST  https://user.nobleprog.com/addip

url="ssh://git.nobleprog.com:3322/home/rcs/dadesktop_npnode_deploy"
while [ $(curl -o /dev/null -s -w "%{http_code}\n" -X POST "$url") -eq 403 ]; do
  echo Waiting for autharization to get through... renewing in 5 sec. This can take few minutes.
  sleep 5
done



mkdir -p /apps
which git > /dev/null || (apt update && apt install -y git)
git config --global credential.helper cache
git config --system --add safe.directory "*"

cd /apps/
git clone  --depth 1 $url
cd dadesktop_npnode_deploy
echo Press enter to deploy DaDesktop node or this machine or CTRL+C to abort
read
time ./deploy.sh
