fixed some curl refs

This commit is contained in:
Paul Wilde 2024-03-13 11:42:36 +00:00
parent fe48133d22
commit 1d13e3e453

View file

@ -1,5 +1,5 @@
Set-Alias -Name curl -Value ./bin/curl.exe Set-Alias -Name .bin/curl.exe -Value ./bin/.bin/curl.exe.exe
$dir = Split-Path $script:MyInvocation.MyCommand.Path $dir = Split-Path $script:MyInvocation.MyCommand.Path
. "$dir/env.ps1" . "$dir/env.ps1"
@ -18,19 +18,19 @@ Write-Host $running
if ( $running ) { if ( $running ) {
Write-Host "Backup already running; $running. Exiting..." Write-Host "Backup already running; $running. Exiting..."
if ( $KUMA_ID -ne "" ){ if ( $KUMA_ID -ne "" ){
curl https://$KUMA_URL/api/push/$KUMA_ID?status=down"&"msg=Failed"&"ping= .bin/curl.exe https://$KUMA_URL/api/push/$KUMA_ID?status=down"&"msg=Failed"&"ping=
} }
if ( $HEALTHCHECK_UUID -ne "" ) { if ( $HEALTHCHECK_UUID -ne "" ) {
curl https://hc-ping.com/$HEALTHCHECK_UUID/fail .bin/curl.exe https://hc-ping.com/$HEALTHCHECK_UUID/fail
} }
exit exit
} }
Write-Host "Not currently running. Continuing..." Write-Host "Not currently running. Continuing..."
if ( $KUMA_ID -ne "" ){ if ( $KUMA_ID -ne "" ){
curl https://$KUMA_URL/api/push/$KUMA_ID?status=up"&"msg=Running"&"ping= .bin/curl.exe https://$KUMA_URL/api/push/$KUMA_ID?status=up"&"msg=Running"&"ping=
} }
if ( $HEALTHCHECK_UUID -ne "" ) { if ( $HEALTHCHECK_UUID -ne "" ) {
curl https://hc-ping.com/$HEALTHCHECK_UUID/start .bin/curl.exe https://hc-ping.com/$HEALTHCHECK_UUID/start
} }
if ( $PRE_RUN_SCRIPT ) { if ( $PRE_RUN_SCRIPT ) {
. $dir/$PRE_RUN_SCRIPT . $dir/$PRE_RUN_SCRIPT
@ -41,16 +41,16 @@ if ( $LastExitCode -eq 0 ) {
. $dir/$POST_RUN_SCRIPT . $dir/$POST_RUN_SCRIPT
} }
if ( $KUMA_ID -ne "" ){ if ( $KUMA_ID -ne "" ){
curl https://$KUMA_URL/api/push/$KUMA_ID?status=up"&"msg=Completed"&"ping= .bin/curl.exe https://$KUMA_URL/api/push/$KUMA_ID?status=up"&"msg=Completed"&"ping=
} }
if ( $HEALTHCHECK_UUID -ne "" ) { if ( $HEALTHCHECK_UUID -ne "" ) {
curl https://hc-ping.com/$HEALTHCHECK_UUID .bin/curl.exe https://hc-ping.com/$HEALTHCHECK_UUID
} }
} else { } else {
if ( $KUMA_ID -ne "" ){ if ( $KUMA_ID -ne "" ){
curl https://$KUMA_URL/api/push/$KUMA_ID?status=down"&"msg=Failed"&"ping= .bin/curl.exe https://$KUMA_URL/api/push/$KUMA_ID?status=down"&"msg=Failed"&"ping=
} }
if ( $HEALTHCHECK_UUID -ne "" ) { if ( $HEALTHCHECK_UUID -ne "" ) {
curl https://hc-ping.com/$HEALTHCHECK_UUID/fail .bin/curl.exe https://hc-ping.com/$HEALTHCHECK_UUID/fail
} }
} }