vpp-maglevd ships maglevd, maglevd-frontend, both systemd units, and the config conffiles. vpp-maglev ships maglevc and maglevt as pure client tools so jump hosts and workstations can install them without pulling in the daemon. pkg-deb now emits four .debs per release (2 packages x 2 archs); build-deb.sh takes a package-name argument and dispatches accordingly.
36 lines
1.4 KiB
Bash
36 lines
1.4 KiB
Bash
#!/bin/sh
|
|
set -e
|
|
case "$1" in
|
|
configure)
|
|
# Create system user and group if they don't exist.
|
|
if ! getent group maglevd > /dev/null 2>&1; then
|
|
addgroup --system --quiet maglevd
|
|
fi
|
|
if ! getent passwd maglevd > /dev/null 2>&1; then
|
|
adduser --system --no-create-home --shell /usr/sbin/nologin \
|
|
--ingroup maglevd --quiet maglevd
|
|
fi
|
|
|
|
# Add maglevd to vpp group if it exists (needed for VPP API socket access).
|
|
if getent group vpp > /dev/null 2>&1; then
|
|
adduser --quiet maglevd vpp || true
|
|
fi
|
|
|
|
# Upgrade path: older versions of this package shipped the
|
|
# daemon unit as vpp-maglevd.service. Stop and disable it so
|
|
# the rename to vpp-maglev.service takes effect cleanly; the
|
|
# old unit file itself is removed automatically because the
|
|
# new package no longer owns it.
|
|
if systemctl list-unit-files vpp-maglevd.service > /dev/null 2>&1; then
|
|
systemctl stop vpp-maglevd.service || true
|
|
systemctl disable vpp-maglevd.service || true
|
|
fi
|
|
|
|
systemctl daemon-reload || true
|
|
systemctl enable vpp-maglev.service || true
|
|
# vpp-maglev-frontend is intentionally NOT enabled here: the
|
|
# operator decides whether to expose the web dashboard. Enable
|
|
# with: systemctl enable --now vpp-maglev-frontend
|
|
;;
|
|
esac
|