8e7977173b71fd370194613c7ebdfe88ac3e50be
[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 # setup monkeysphere authentication
21 monkeysphere-authentication setup
22
23 # dh_installdeb will replace this with shell code automatically
24 # generated by other debhelper scripts.
25
26 #DEBHELPER#
27
28 exit 0