Initial import: nasmon health monitor, split out of home_nas

Go service (nasmon/) plus nfpm packaging (packaging/), carried over from
the home_nas monorepo. Adds rpm packaging alongside the existing deb
build (Fedora/RHEL/Rocky dependency names via nfpm overrides, per-format
systemd unit path, dpkg+rpm-compatible maintainer scripts) and a Gitea
Actions workflow that builds both formats on every push.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
2026-09-19 10:24:34 +03:00
co-authored by Claude Sonnet 5
commit 09159a5f31
61 changed files with 7882 additions and 0 deletions
+16
View File
@@ -0,0 +1,16 @@
#!/bin/sh
set -e
# config holds the SMTP password: root only
chmod 0600 /etc/nasmon/config.json 2>/dev/null || true
chmod 0750 /var/lib/nasmon
if [ -d /run/systemd/system ]; then
systemctl daemon-reload
systemctl enable nasmon.service >/dev/null 2>&1 || true
# restart on upgrade, start on fresh install
systemctl restart nasmon.service || true
# Windows network discovery, only when the wsdd package is present
if [ -x /usr/bin/wsdd ]; then
systemctl enable --now wsdd.service >/dev/null 2>&1 || true
fi
fi
exit 0