diff --git a/beta/manual-daemon.html b/beta/manual-daemon.html index 9d3de2dd..9d5963e7 100644 --- a/beta/manual-daemon.html +++ b/beta/manual-daemon.html @@ -594,12 +594,21 @@ script_pre_run/script_post_run
Defines absolute paths to custom scripts to be executed immediately before or after the sync, scrub, check, or fix commands. These scripts allow for custom logic such as mounting drives or sending custom alerts. -
security Requirements: -- The path must be absolute (starting with /). -- The script must not be world-writable (recommended permissions: 700 or 755). -- The script owner must match the daemon user or be root. -- The script must contain a valid shebang (e.g., #!/bin/sh). -
+The following examples demonstrate common notification and heartbeat +configurations +
To monitor that automated maintenance is running successfully, use a service +like Healthchecks.io. +
In this example, curl sends a simple GET request to a unique monitoring URL. +The flags ensure that curl fails silently on server errors (-f), does not hang +indefinitely (--max-time), and attempts to overcome transient network issues (--retry). +
+notify_heartbeat = curl -f --max-time 30 --retry 3 https://hc-ping.com/your_private_uuid ++
This uses curl to send the report as a POST request to a push notification service. +It utilizes the --narrow flag to ensure the report is readable on mobile devices +and maps SnapRAID status to ntfy titles, priorities, and emojis via placeholders. +
+notify_result = curl --narrow -f --max-time 30 --retry 3 -H "Title: %s" -H "Priority: %n" -H "Tag: %t" -H "Email: your_email@example.com" --data-binary @- https://ntfy.sh/your_private_topic ++
A traditional approach using the standard Linux mail utility. This is +ideal if you have a local Mail Transfer Agent (MTA) like Postfix or +Exim already configured on your system. +
+notify_result = mail -s "%s" your_user@localhost ++
This leverages curl's built-in SMTP engine for direct delivery to an +external provider. By using the --netrc option, login credentials +remain secured in a separate file rather than being exposed in the +process list or logs. +
+notify_result = curl --netrc --url smtps://smtp.gmail.com:465 --ssl-reqd --mail-from your_email@gmail.com --mail-rcpt your_email@gmail.com --upload-file - ++