summaryrefslogtreecommitdiff
path: root/packaging/freebsd/pkg-install
diff options
context:
space:
mode:
authorDaniel Kahn Gillmor <dkg@fifthhorseman.net>2008-10-30 17:25:40 -0400
committerDaniel Kahn Gillmor <dkg@fifthhorseman.net>2008-10-30 17:25:40 -0400
commit846174da30ba5e96c6537a1a5c88666b3120177b (patch)
tree14d3c35b4e7a317c0e776e1c5f1009df331b5e88 /packaging/freebsd/pkg-install
parent46cb105f343f7e9e97be60dcf32fae50a1463c29 (diff)
reorganizing FreeBSD port to make it clearer where it in /usr/ports and to make it easier to rebuild the port
Diffstat (limited to 'packaging/freebsd/pkg-install')
-rwxr-xr-xpackaging/freebsd/pkg-install72
1 files changed, 0 insertions, 72 deletions
diff --git a/packaging/freebsd/pkg-install b/packaging/freebsd/pkg-install
deleted file mode 100755
index 70d37b5..0000000
--- a/packaging/freebsd/pkg-install
+++ /dev/null
@@ -1,72 +0,0 @@
-#!/bin/sh
-
-# an installation script for monkeysphere (borrowing liberally from
-# postgresql and mysql pkg-install scripts, and from monkeysphere's
-# debian/monkeysphere.postinst)
-
-# Author: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
-# Copyright 2008
-
-# FIXME: is /var/lib/monkeysphere the right place for this stuff on
-# FreeBSD?
-
-# PostgreSQL puts its data in /usr/local/pgsql/data
-
-# MySQL puts its data in /var/db/mysql
-
-VARLIB="/var/monkeysphere"
-ETCDIR="/usr/local/etc/monkeysphere"
-
-case $2 in
-POST-INSTALL)
- USER=monkeysphere
- GROUP=${USER}
- UID=641
- GID=${UID}
- SHELL=/usr/local/bin/bash
-
- if pw group show "${GROUP}" >/dev/null 2>&1; then
- echo "You already have a group \"${GROUP}\", so I will use it."
- else
- if pw groupadd ${GROUP} -g ${GID}; then
- echo "Added group \"${GROUP}\"."
- else
- echo "Adding group \"${GROUP}\" failed..."
- exit 1
- fi
- fi
-
- if pw user show "${USER}" >/dev/null 2>&1; then
- oldshell=`pw user show "${USER}" 2>/dev/null | cut -f10 -d:`
- if [ x"$oldshell" != x"$SHELL" ]; then
- echo "You already have a \"${USER}\" user, but its shell is '$oldshell'."
- echo "This package requires that \"${USER}\"'s shell be '$SHELL'."
- echo "You should fix this by hand and then re-install the package."
- echo " hint: pw usermod '$USER' -s '$SHELL'"
- exit 1
- fi
- echo "You already have a user \"${USER}\" with the proper shell, so I will use it."
- else
- if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
- -d "$VARLIB" -s /usr/local/bin/bash -c "monkeysphere authentication user,,,"
- then
- echo "Added user \"${USER}\"."
- else
- echo "Adding user \"${USER}\" failed..."
- exit 1
- fi
- fi
-
- ## set up the cache directories, and link them to the config files:
-
- install -d -o root -g monkeysphere -m 750 "$VARLIB"/gnupg-host
- ln -sf "$ETCDIR"/gnupg-host.conf "$VARLIB"/gnupg-host/gpg.conf
-
- install -d -o monkeysphere -g monkeysphere -m 700 "$VARLIB"/gnupg-authentication
- ln -sf "$ETCDIR"/gnupg-authentication.conf "$VARLIB"/gnupg-authentication/gpg.conf
-
- install -d "$VARLIB"/tmp "$VARLIB"/authorized_keys
-
- monkeysphere-server diagnostics
- ;;
-esac