3 # postinst script for monkeysphere
5 # Author: Jameson Rollins <jrollins@fifthhorseman.net>
8 VARLIB="/var/lib/monkeysphere"
10 if ! getent passwd monkeysphere >/dev/null ; then
11 echo "adding monkeysphere user..."
12 adduser --quiet --system --no-create-home --group \
13 --home '/var/lib/monkeysphere' \
15 --gecos 'monkeysphere authentication user,,,' \
19 # install host gnupg home directory
20 install --owner root --group monkeysphere --mode 750 -d "$VARLIB"/gnupg-host
21 # install host gpg.conf
22 cat <<EOF > "$VARLIB"/gnupg-host/gpg.conf
23 list-options show-uid-validity
26 # install authentication gnupg home directory
27 install --owner monkeysphere --group monkeysphere --mode 700 -d "$VARLIB"/gnupg-authentication
28 # install authentication gpg.conf
29 cat <<EOF > "$VARLIB"/gnupg-authentication/gpg.conf
30 list-options show-uid-validity
31 primary-keyring "$VARLIB"/gnupg-authentication/pubring.gpg
32 keyring "$VARLIB"/gnupg-host/pubring.gpg
34 chown monkeysphere:monkeysphere "$VARLIB"/gnupg-authentication/gpg.conf