diff --git a/rust/gateway/Cargo.toml b/rust/gateway/Cargo.toml index fbb75fcdf..dcd7c55eb 100644 --- a/rust/gateway/Cargo.toml +++ b/rust/gateway/Cargo.toml @@ -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 } diff --git a/rust/gateway/debian/postinst b/rust/gateway/debian/postinst index 661f7184a..421b116b2 100644 --- a/rust/gateway/debian/postinst +++ b/rust/gateway/debian/postinst @@ -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#