diff options
author | Wilmer van der Gaast <wilmer@gaast.net> | 2009-06-07 21:19:25 +0100 |
---|---|---|
committer | Wilmer van der Gaast <wilmer@gaast.net> | 2009-06-07 21:19:25 +0100 |
commit | 25dfb16035f12ba15ad5fcfb6d428386ac4c38ce (patch) | |
tree | 02b6472d33af972827538d0754f3f74d57aa3114 /debian/config | |
parent | 59169956e1f7a5dd86e3c1aab41bc6a252f7b653 (diff) |
Forgot to commit before starting to work on the second item, so here's a
monster commit. :-)
* Removing code that edits bitlbee.conf from postinst (and chown code in
the init script), it's not really necessary anymore; bitlbee may only
still run as root if the admin doesn't read conffile diffs.
(Closes: #514572)
* No longer overwriting port number info in /etc/default/bitlbee with
what's in debconf. (Closes: #514148)
* Added notes about the above two changes to bitlbee.conf.
Diffstat (limited to 'debian/config')
-rwxr-xr-x | debian/config | 23 |
1 files changed, 14 insertions, 9 deletions
diff --git a/debian/config b/debian/config index 2bd9b879..9bb78237 100755 --- a/debian/config +++ b/debian/config @@ -1,18 +1,23 @@ #!/bin/sh -e . /usr/share/debconf/confmodule +[ -f /etc/default/bitlbee ] && . /etc/default/bitlbee db_title BitlBee -db_get bitlbee/serveport -if [ "$RET" = "stillhavetoask" ]; then - listens=$(netstat -ltn | awk '{print $4}') - for port in 6667 6666 6668 6669; do - if [ $(expr "$listens " : ".*:$port\s") = "0" ]; then - break - fi - done - db_set bitlbee/serveport $port; +if [ -n "$BITLBEE_PORT" ]; then + db_set bitlbee/serveport "$BITLBEE_PORT" +else + db_get bitlbee/serveport + if [ "$RET" = "stillhavetoask" ]; then + listens=$(netstat -ltn | awk '{print $4}') + for port in 6667 6666 6668 6669; do + if [ $(expr "$listens " : ".*:$port\s") = "0" ]; then + break + fi + done + db_set bitlbee/serveport $port; + fi fi if db_input medium bitlbee/serveport; then |