diff --git a/README.md b/README.md index 8914cf5..b4ab350 100644 --- a/README.md +++ b/README.md @@ -47,6 +47,7 @@ udpate - CLEANBACKUPDIRBEFORE=false #automatically deletes all files from the backup directory before process start - CLEANBACKUPDIRAFTER=false #automatically deletes all files from the backup directory after process run - ARCHIVEPERITEM=false #automatically create 1 archive in the backup per folder in the source directory + - HEALTHCHECKSURL=https://hc-ping.com/xxxxxxxxxxxx #disabled by default, put a healthchecks.io endpoint here or any other similar endpoint you want pinged with a "GET" when the job is successfull #Bitwarden - BW_CLIENTID=87asdhj1 #You API client ID - BW_CLIENTSECRET=secretsecretsecret #Your API secret diff --git a/reporting.ps1 b/reporting.ps1 index 8383bb1..537eab8 100644 --- a/reporting.ps1 +++ b/reporting.ps1 @@ -54,4 +54,6 @@ if(($data | convertfrom-json).status -like "Fail"){ if($retrycount -le $ENV:MAXRETRY){ . /backupscript.ps1 } +}elseif($ENV:HEALTHCHECKSURL){ + invoke-webrequest $ENV:HEALTHCHECKSURL -SkipHttpErrorCheck -SkipCertificateCheck -SkipHeaderValidation -ErrorAction SilentlyContinue }