X-Git-Url: https://codewiz.org/gitweb?a=blobdiff_plain;f=packaging%2Fdebian%2Fmonkeysphere.postinst;h=bbb02cfd0c658300057d5c94b89c9a8e8575fa00;hb=01cc7607ee14feb1b8ebc91c9a9e5bed92f7a413;hp=c697ae22d39f3327cfaddae5031fd4e8e7dda9e9;hpb=af6f93d261025cd859996fce65e7edfc68fb1f34;p=monkeysphere.git diff --git a/packaging/debian/monkeysphere.postinst b/packaging/debian/monkeysphere.postinst index c697ae2..bbb02cf 100755 --- a/packaging/debian/monkeysphere.postinst +++ b/packaging/debian/monkeysphere.postinst @@ -7,18 +7,25 @@ VARLIB="/var/lib/monkeysphere" -# add a monkeysphere user if one does not already exist -if ! getent passwd monkeysphere >/dev/null ; then - echo "adding monkeysphere user..." - adduser --quiet --system --no-create-home --group \ - --home "$VARLIB" \ - --shell '/bin/bash' \ - --gecos 'monkeysphere authentication user,,,' \ - monkeysphere -fi - -# import the host ssh key into the monkeysphere, with no expiration -# FIXME: figure out how to do this best +case $1 in + configure) + # add a monkeysphere user if one does not already exist + if ! getent passwd monkeysphere >/dev/null ; then + echo "adding monkeysphere user..." + adduser --quiet --system --no-create-home --group \ + --home "$VARLIB" \ + --shell '/bin/bash' \ + --gecos 'monkeysphere authentication user,,,' \ + monkeysphere + fi + + # try to transition from to 0.23: + /usr/share/monkeysphere/transitions/0.23 + + # setup monkeysphere authentication + monkeysphere-authentication setup + ;; +esac # dh_installdeb will replace this with shell code automatically # generated by other debhelper scripts.