3 # postinst script for monkeysphere
5 # Author: Jameson Rollins <jrollins@fifthhorseman.net>
8 ETC="/etc/monkeysphere"
9 VARLIB="/var/lib/monkeysphere"
11 if ! getent passwd monkeysphere >/dev/null ; then
12 echo "adding monkeysphere user..."
13 adduser --quiet --system --no-create-home --group \
16 --gecos 'monkeysphere authentication user,,,' \
20 # install host gnupg home directory
21 install --owner root --group monkeysphere --mode 750 -d "$VARLIB"/gnupg-host
22 # link in the gpg.conf
23 ln -sTf "$ETC"/gnupg-host.conf "$VARLIB"/gnupg-host/gpg.conf
25 # install authentication gnupg home directory
26 install --owner monkeysphere --group monkeysphere --mode 700 -d "$VARLIB"/gnupg-authentication
27 # link in the gpg.conf
28 ln -sTf "$ETC"/gnupg-authentication.conf "$VARLIB"/gnupg-authentication/gpg.conf