diff options
| author | Christophe Besson <cbesson@gmail.com> | 2026-08-09 05:19:13 +0200 |
|---|---|---|
| committer | Christophe Besson <cbesson@gmail.com> | 2026-08-09 05:19:13 +0200 |
| commit | deee67755991994742ef144400857dd5f6b8aafa (patch) | |
| tree | 1daf5196d03046d7c33bc4ec00480ccf66289bc6 /packaging/deb/meshbay-hub/DEBIAN/postinst | |
| parent | 42556800d103ede20b4e97f2d91d20bbc0000c1e (diff) | |
| download | meshbay-deee67755991994742ef144400857dd5f6b8aafa.tar.gz | |
chore: add RPM/DEB packaging artifacts — 5.10
3 packages: python3-meshbay-common (dep), meshbay-hub, meshbay-node.
RPM: spec files with pre/post scriptlets (useradd, systemd macros).
DEB: DEBIAN/control + postinst for hub, control for node + common.
Systemd: hub.service (system, security hardening) + node.service
(user template @%i, EnvironmentFile for MESHBAY_UNLOCK_KEY).
packaging/README.md: build + install instructions.
Co-Authored-By: Claude Sonnet 4.6 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'packaging/deb/meshbay-hub/DEBIAN/postinst')
| -rw-r--r-- | packaging/deb/meshbay-hub/DEBIAN/postinst | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/packaging/deb/meshbay-hub/DEBIAN/postinst b/packaging/deb/meshbay-hub/DEBIAN/postinst new file mode 100644 index 0000000..48921f2 --- /dev/null +++ b/packaging/deb/meshbay-hub/DEBIAN/postinst @@ -0,0 +1,29 @@ +#!/bin/sh +set -e + +case "$1" in + configure) + # Create service account + if ! getent group meshbay >/dev/null 2>&1; then + addgroup --system meshbay + fi + if ! getent passwd meshbay >/dev/null 2>&1; then + adduser --system --ingroup meshbay --home /var/lib/meshbay \ + --no-create-home --disabled-password \ + --gecos "MeshBay service account" meshbay + fi + + # Create data directory + install -d -o meshbay -g meshbay -m 750 /var/lib/meshbay/hub + install -d -o meshbay -g meshbay -m 750 /var/log/meshbay + + # Enable and start service + if [ -d /run/systemd/system ]; then + systemctl daemon-reload || true + systemctl enable meshbay-hub.service || true + systemctl start meshbay-hub.service || true + fi + ;; +esac + +#DEBHELPER# |