summaryrefslogtreecommitdiff
path: root/debian/monkeysphere.preinst
blob: bfa6a9168f1dd4068011ab62cdb4b5a40b13b78d (plain)
  1. #!/bin/sh -e
  2. # preinst script for monkeysphere
  3. # Author: Jameson Rollins <jrollins@fifthhorseman.net>
  4. # Copyright 2008
  5. ETC="/etc/monkeysphere"
  6. VARLIB="/var/lib/monkeysphere"
  7. # move the gpg.conf files from the GNUPGHOMEs if they're there to
  8. # /etc, where they will be linked back into the GNUPGHOMEs later
  9. if [ -f "$VARLIB"/gnupg-host/gpg.conf -a ! -L "$VARLIB"/gnupg-host/gpg.conf ] ; then
  10. mv "$VARLIB"/gnupg-host/gpg.conf "$ETC"/gpg-host.conf
  11. fi
  12. if [ -f "$VARLIB"/gnupg-authentication/gpg.conf -a ! -L "$VARLIB"/gnupg-authentication/gpg.conf ] ; then
  13. mv "$VARLIB"/gnupg-authentication/gpg.conf "$ETC"/gnupg-authentication.conf
  14. fi