Mercurial > noffle
comparison debian/postinst @ 411:b9018588cc52 noffle
[svn] fixed update-inetd
author | godisch |
---|---|
date | Thu, 19 Jun 2003 23:25:30 +0100 |
parents | 71801bfc07c2 |
children | fbdcd908aa7c |
comparison
equal
deleted
inserted
replaced
410:c9ff77f643a2 | 411:b9018588cc52 |
---|---|
1 #!/bin/sh | 1 #!/bin/sh |
2 # $Id: postinst 540 2003-06-03 21:17:53Z godisch $ | 2 # $Id: postinst 554 2003-06-19 22:25:30Z godisch $ |
3 | 3 |
4 set -e | 4 set -e |
5 | 5 |
6 [ "$1" = configure ] || exit 0 | 6 [ "$1" = configure ] || exit 0 |
7 | 7 |
30 # 1.1.2-1 was in unstable only, don't notify | 30 # 1.1.2-1 was in unstable only, don't notify |
31 mv -f /etc/noffle.conf $server_config || : | 31 mv -f /etc/noffle.conf $server_config || : |
32 mv -f /etc/noffle.conf.old $server_config.old 2> /dev/null || : | 32 mv -f /etc/noffle.conf.old $server_config.old 2> /dev/null || : |
33 fi | 33 fi |
34 | 34 |
35 # maybe disabled only, e.g. dpkg -r noffle | |
36 update-inetd --remove "/usr/bin/noffle -r" || : | |
35 if [ -e /usr/share/debconf/confmodule ]; then | 37 if [ -e /usr/share/debconf/confmodule ]; then |
36 . /usr/share/debconf/confmodule | 38 . /usr/share/debconf/confmodule |
37 db_version 2.0 | 39 db_version 2.0 |
38 db_get noffle/debconf | 40 db_get noffle/debconf |
39 if [ "$RET" = true ]; then | 41 if [ "$RET" = true ]; then |
40 db_get noffle/port | 42 db_get noffle/port |
41 port="$RET" | 43 port="$RET" |
42 if [ -z "$port" -o "$port" = 119 ]; then | 44 if [ -z "$port" -o "$port" = 119 ]; then |
43 port=nntp | 45 port=nntp |
44 fi | 46 fi |
45 # maybe disabled only, e.g. dpkg -r noffle | |
46 update-inetd --remove "/usr/bin/noffle -r" || : | |
47 update-inetd --group MAIL --add "$port\tstream\ttcp\tnowait\tnews\t/usr/sbin/tcpd /usr/bin/noffle -r" | 47 update-inetd --group MAIL --add "$port\tstream\ttcp\tnowait\tnews\t/usr/sbin/tcpd /usr/bin/noffle -r" |
48 db_get noffle/server | 48 db_get noffle/server |
49 server="$RET" | 49 server="$RET" |
50 [ "$server" ] || server=news | 50 [ "$server" ] || server=news |
51 db_get noffle/username | 51 db_get noffle/username |
101 if [ ! -e $debian_config ]; then | 101 if [ ! -e $debian_config ]; then |
102 umask 022 | 102 umask 022 |
103 cp -f /usr/share/noffle/conf.debian $debian_config.new | 103 cp -f /usr/share/noffle/conf.debian $debian_config.new |
104 mv -fb $debian_config.new $debian_config | 104 mv -fb $debian_config.new $debian_config |
105 fi | 105 fi |
106 update-inetd --group MAIL --add "nntp\tstream\ttcp\tnowait\tnews\t/usr/sbin/tcpd /usr/bin/noffle -r" | |
106 fi | 107 fi |
107 | 108 |
108 # sanity checks | 109 # sanity checks |
109 chown -R news:news /var/lock/noffle /var/spool/noffle | 110 chown -R news:news /var/lock/noffle /var/spool/noffle |
110 chmod -R go-w /var/lock/noffle /var/spool/noffle | 111 chmod -R go-w /var/lock/noffle /var/spool/noffle |