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