diff --git a/.goreleaser.yml b/.goreleaser.yml index cb610ad..7f7fab7 100644 --- a/.goreleaser.yml +++ b/.goreleaser.yml @@ -74,6 +74,7 @@ nfpms: dependencies: - "nftables" - "openconnect" + - "init-system-helpers (>= 1.62)" bindir: /usr/bin section: net # important: this makes the package non native diff --git a/build/package/postinstall.sh b/build/package/postinstall.sh index 8ed3404..5f50ccf 100644 --- a/build/package/postinstall.sh +++ b/build/package/postinstall.sh @@ -1,10 +1,10 @@ #!/bin/sh -e -# taken from https://github.com/Debian/debhelper/blob/master/dh +# taken from https://git.launchpad.net/ubuntu/+source/debhelper/tree/autoscripts/postinst-systemd-enable?h=applied/13.6ubuntu1 UNIT='oc-daemon.service' case "$1" in - 'configure' | 'abort-upgrade' | 'abort-deconfigure' | 'abort-remove') + 'configure' | 'abort-upgrade' | 'abort-deconfigure' | 'abort-remove') # This will only remove masks created by d-s-h on package removal. deb-systemd-helper unmask $UNIT >/dev/null || true diff --git a/build/package/postremove.sh b/build/package/postremove.sh index 251f2a5..f8799a0 100644 --- a/build/package/postremove.sh +++ b/build/package/postremove.sh @@ -1,13 +1,10 @@ #!/bin/sh -e -# taken from https://github.com/Debian/debhelper/blob/master/dh +# taken from https://git.launchpad.net/ubuntu/+source/debhelper/tree/autoscripts/postrm-systemd?h=applied/13.6ubuntu1 and UNIT='oc-daemon.service' case "$1" in 'remove') - if [ -d /run/systemd/system ] ; then - systemctl --system daemon-reload >/dev/null || true - fi if [ -x "/usr/bin/deb-systemd-helper" ]; then deb-systemd-helper mask $UNIT >/dev/null || true fi diff --git a/build/package/preremove.sh b/build/package/preremove.sh index 6efa418..f291d7c 100644 --- a/build/package/preremove.sh +++ b/build/package/preremove.sh @@ -1,5 +1,5 @@ #!/bin/sh -e -# taken from https://github.com/Debian/debhelper/blob/master/dh +# taken from https://git.launchpad.net/ubuntu/+source/debhelper/tree/autoscripts/preinst-systemd-stop?h=applied/13.6ubuntu1 UNIT='oc-daemon.service'