Skip to content

Commit

Permalink
Merge pull request #31 from telekom-mms/fix_scripts
Browse files Browse the repository at this point in the history
fix links and add dependency
  • Loading branch information
malaupa authored Jun 15, 2023
2 parents 340a2a3 + 40e63ab commit 25fdad8
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
1 change: 1 addition & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions build/package/postinstall.sh
Original file line number Diff line number Diff line change
@@ -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

Expand Down
5 changes: 1 addition & 4 deletions build/package/postremove.sh
Original file line number Diff line number Diff line change
@@ -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
Expand Down
2 changes: 1 addition & 1 deletion build/package/preremove.sh
Original file line number Diff line number Diff line change
@@ -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'

Expand Down

0 comments on commit 25fdad8

Please sign in to comment.