From cf11a13945907a7aecb0fa2eb9aa5a0940a66d47 Mon Sep 17 00:00:00 2001 From: tali Date: Fri, 2 Feb 2024 17:54:06 -0500 Subject: [PATCH] create postinst script --- deploy/_build.sh | 2 ++ deploy/postinst.sh | 4 ++++ 2 files changed, 6 insertions(+) create mode 100644 deploy/postinst.sh diff --git a/deploy/_build.sh b/deploy/_build.sh index f5f2d15..ca63554 100755 --- a/deploy/_build.sh +++ b/deploy/_build.sh @@ -36,6 +36,8 @@ echo "Description: ${dsc}" >> $control echo "Maintainer: ${mtr}" >> $control echo "Architecture: ${arch}" >> $control +install -m 755 talircd/deploy/postinst.sh $root/DEBIAN/postinst + # generate .deb dpkg-deb --root-owner-group -b $root "dist/${pkg}_${ver}-${rev}_${arch}.deb" diff --git a/deploy/postinst.sh b/deploy/postinst.sh new file mode 100644 index 0000000..c7445bd --- /dev/null +++ b/deploy/postinst.sh @@ -0,0 +1,4 @@ +#!/usr/bin/sh +[ -f /etc/talircd.conf ] || install -m 644 /usr/share/talircd/default/conf /etc/talircd.conf +[ -f /etc/talircd.motd ] || install -m 644 /usr/share/talircd/default/motd /etc/talircd.motd +systemctl daemon-reload