#!/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