Merge commit 'dkg/master'
[monkeysphere.git] / packaging / debian / monkeysphere.postinst
1 #!/bin/sh -e
2
3 # postinst script for monkeysphere
4
5 # Author: Jameson Rollins <jrollins@finestructure.net>
6 # Copyright 2008-2009
7
8 VARLIB="/var/lib/monkeysphere"
9
10 # add a monkeysphere user if one does not already exist
11 if ! getent passwd monkeysphere >/dev/null ; then
12     echo "adding monkeysphere user..."
13     adduser --quiet --system --no-create-home --group \
14         --home "$VARLIB" \
15         --shell '/bin/bash' \
16         --gecos 'monkeysphere authentication user,,,' \
17         monkeysphere
18 fi
19
20 # try to transition from 0.22 to 0.23:
21 /usr/share/monkeysphere/transition_0.22_0.23
22
23 # setup monkeysphere authentication
24 monkeysphere-authentication setup
25
26 # dh_installdeb will replace this with shell code automatically
27 # generated by other debhelper scripts.
28
29 #DEBHELPER#
30
31 exit 0