PowerDNS / weakforced

Anti-Abuse for servers at authentication time
GNU General Public License v3.0
125 stars 33 forks source link

Update wforce.postinst #435

Closed herrwagner closed 3 weeks ago

herrwagner commented 3 weeks ago

Call wforce binary with --execute option instead command via pipe in debian postinstall. The later one fails if the wforce daemon is running.

Setting up wforce (2.10.2+39.g194df92-1pdns.bullseye) ... Modifying wforce.conf to replace password and key...dpkg: error processing package wforce (--configure): installed wforce package post-installation script subprocess returned error exit status 1 Errors were encountered while processing: wforce

~# echo "makeKey()" | wforce Read configuration from '/etc/wforce/wforce.conf' Adding webserver listener on 0.0.0.0:8085 with SSL=0, cert_file=, key_file= Adding webserver listener on 0.0.0.0:8084 with SSL=1, [...] Unable to bind to control socket on 127.0.0.1:4004: binding socket to 127.0.0.1:4004: Address already in use

neilcook commented 3 weeks ago

If you're going to do this for wforce.postinst, can you also do the same for wforce-trackalert.postinst? It would also make sense to make the same changes in wforce.spec as well...

herrwagner commented 3 weeks ago

I was a little bit hasty. The change will lead to some issues during a fresh installation where no wforce is running to connect to for wforce --execute. I will change both postinstall scripts to consider that and will create a new pull request.