#!/bin/sh
set -eu
if ! id ironwatch >/dev/null 2>&1; then adduser --system --group --home /srv/ironwatch --no-create-home ironwatch; fi
install -d -m 750 -o root -g ironwatch /etc/ironwatch
install -d -m 750 -o ironwatch -g ironwatch /srv/ironwatch
systemctl daemon-reload || true
echo "Package installed without starting a service. Configure MariaDB and /etc/ironwatch/ironwatch.env before enabling ironwatch-packaged.service."
