]> git.mxchange.org Git - quix0rs-apt-p2p.git/blobdiff - debian/postinst
Update the config file for the change in default key expiry length.
[quix0rs-apt-p2p.git] / debian / postinst
index 636f90f207e877bea04becb2b260098e2c208411..e167c41fc90bbe7b6473d83e6a94d64890f38366 100644 (file)
@@ -1,10 +1,12 @@
 #! /bin/sh
-# postinst script for apt-dht
+# postinst script for apt-p2p
 #
 # see: dh_installdeb(1)
 
 set -e
 
+. /usr/share/debconf/confmodule
+
 # summary of how this script can be called:
 #        * <postinst> `configure' <most-recently-configured-version>
 #        * <old-postinst> `abort-upgrade' <new version>
@@ -25,17 +27,17 @@ set -e
 
 case "$1" in
     configure)
-               if ! getent passwd aptdht >/dev/null; then
+               if ! getent passwd apt-p2p >/dev/null; then
                        adduser --quiet --system --no-create-home \
-                                       --home /var/cache/apt-dht --disabled-password \
+                                       --home /var/cache/apt-p2p --disabled-password \
                                        --disabled-login --shell /bin/false --ingroup nogroup \
-                                       aptdht
+                                       apt-p2p
                fi
                
-               touch /var/log/apt-dht.log
-               chown aptdht:adm /var/log/apt-dht.log
-               mkdir -p /var/cache/apt-dht
-               chown -R aptdht:adm /var/cache/apt-dht
+               touch /var/log/apt-p2p.log
+               chown apt-p2p:adm /var/log/apt-p2p.log
+               mkdir -p /var/cache/apt-p2p
+               chown -R apt-p2p:adm /var/cache/apt-p2p
     ;;
 
     abort-upgrade|abort-remove|abort-deconfigure)
@@ -47,6 +49,9 @@ case "$1" in
     ;;
 esac
 
+# Tell debconf to stop so it doesn't get confused
+db_stop
+
 # dh_installdeb will replace this with shell code automatically
 # generated by other debhelper scripts.