I have setup borgbackup on my nixos server and it works flawlessly.
However, despite being successful, the corresponding systemd service ends as failed because of the ping via curl to the healthchecks.io website:
By the way, both the healthchecks.io pre and posthook urls are also successfully pinged.
This is an example of my preHook and postHook section:
preHook = "${pkgs.curl}/bin/curl -fsS -m 10 --retry 5 -o /dev/null https://hc-ping.com/blablabla1";
postHook = "
if [ $exitStatus -ne 0 ]; then
${pkgs.curl}/bin/curl \
--fail --show-error --silent \
--max-time 10 --retry 5 \
--data Borgbackup_failed ntfy.mydomain.com/Borgbackup \
else
${pkgs.curl}/bin/curl -fsS -m 10 --retry 5 -o /dev/null https://hc-ping.com/blablabla2 \
fi
";
Thus, if I comment the above part, the systemd service ends as not failed.
Do you know how can I solve this?