summaryrefslogtreecommitdiff
path: root/debian/postinst
diff options
context:
space:
mode:
authorDave Hibberd <d@vehibberd.com>2023-07-18 01:26:17 +0100
committerDave Hibberd <d@vehibberd.com>2023-07-18 01:26:17 +0100
commitacb26fd9800b75a790ea23fa3891476632d51fc4 (patch)
tree19b9675c8875a685f26f12594ba998d241c59179 /debian/postinst
parented81fc5267a230d12a2519e61707025087ec6234 (diff)
Added Debian packaging so far
Diffstat (limited to 'debian/postinst')
-rw-r--r--debian/postinst16
1 files changed, 16 insertions, 0 deletions
diff --git a/debian/postinst b/debian/postinst
new file mode 100644
index 0000000..49d5770
--- /dev/null
+++ b/debian/postinst
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+if [ "$1" = configure ]; then
+# If we have setcap is installed, set the requirements
+# which allows us to install our binaries without the setuid
+# bit.
+ if command -v setcap > /dev/null; then
+ setcap "CAP_NET_ADMIN=ep CAP_NET_RAW=ep CAP_NET_BIND_SERVICE=ep" linbq
+ else
+ echo "Setcap failed on /usr/sbin/linbpq, Features may be limited" >&2
+ fi
+ else
+ echo "Setcap is not installed, Features may be limited" >&2
+fi
+
+#DEBHELPER#