Files
nasmon/packaging/postinst.sh
T
a.gritsenkoandClaude Sonnet 5 72e2548149
build / build (push) Failing after 6m36s
Restore executable bit on build.sh and packaging maintainer scripts
core.filemode=false on this Windows checkout dropped the +x bit on the
initial commit.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-09-19 10:24:54 +03:00

17 lines
533 B
Bash
Executable File

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