create postinst script

This commit is contained in:
tali 2024-02-02 17:54:06 -05:00
parent 454d27780c
commit cf11a13945
2 changed files with 6 additions and 0 deletions

View File

@ -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"

4
deploy/postinst.sh Normal file
View File

@ -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