mirror of
https://github.com/outbackdingo/firezone.git
synced 2026-01-27 02:18:47 +00:00
fix(gateway): declare hard-dependency on systemd (#10803)
Several aspects of the Gateway's Debian package depend on `systemd` being present. Without it, we don't have the necessary users and files in place for the Gateway to function. With that specified, we can fail the `postinst` script (and therefore the installation) if anything in there goes wrong.
This commit is contained in:
@@ -21,7 +21,7 @@ assets = [
|
||||
["debian/firezone-gateway.sysusers", "usr/lib/sysusers.d/firezone-gateway.conf", "644"],
|
||||
["debian/firezone-gateway.tmpfiles", "usr/lib/tmpfiles.d/firezone-gateway.conf", "644"],
|
||||
]
|
||||
depends = 'iptables'
|
||||
depends = 'iptables,systemd'
|
||||
|
||||
[dependencies]
|
||||
anyhow = { workspace = true }
|
||||
|
||||
@@ -1,13 +1,8 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Script inspired by deb helper script from `cargo-deb`
|
||||
if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ]; then
|
||||
# In case this system is running systemd, we need to ensure that all
|
||||
# necessary users are created before starting.
|
||||
if [ -d /run/systemd/system ]; then
|
||||
systemd-sysusers firezone-gateway.conf >/dev/null || true
|
||||
fi
|
||||
fi
|
||||
set -e
|
||||
|
||||
systemd-sysusers firezone-gateway.conf
|
||||
|
||||
#DEBHELPER#
|
||||
|
||||
|
||||
Reference in New Issue
Block a user