diff options
author | Sam Lawrance <lawrance@FreeBSD.org> | 2005-12-11 23:51:12 +0000 |
---|---|---|
committer | Sam Lawrance <lawrance@FreeBSD.org> | 2005-12-11 23:51:12 +0000 |
commit | 4992047d947fd9bb8fd29da2fb45a6a0b258c990 (patch) | |
tree | 2df3c4e2d4512a4a4cd3a98b6983ff5adf978aab /net/phpldapadmin/files | |
parent | Unbreak and fix build. (diff) |
Update to 0.9.7.2
PR: ports/90251
Submitted by: Matthew Seaman <m.seaman@infracaninophile.co.uk> (maintainer)
Notes
Notes:
svn path=/head/; revision=150931
Diffstat (limited to 'net/phpldapadmin/files')
-rw-r--r-- | net/phpldapadmin/files/pkg-deinstall.in | 26 | ||||
-rw-r--r-- | net/phpldapadmin/files/pkg-install.in | 98 | ||||
-rw-r--r-- | net/phpldapadmin/files/pkg-message.in | 24 |
3 files changed, 148 insertions, 0 deletions
diff --git a/net/phpldapadmin/files/pkg-deinstall.in b/net/phpldapadmin/files/pkg-deinstall.in new file mode 100644 index 000000000000..cca9c556093d --- /dev/null +++ b/net/phpldapadmin/files/pkg-deinstall.in @@ -0,0 +1,26 @@ +#!/bin/sh +# +# $FreeBSD: /tmp/pcvs/ports/net/phpldapadmin/files/pkg-deinstall.in,v 1.1 2005-12-11 23:51:12 lawrance Exp $ +# + +case $2 in + POST-DEINSTALL) + cat <<EOMSG +The phpldapadmin-suphp port has been deleted. +If you are not upgrading and don't intend to use +phpLDAPadmin any more then you may wish to delete +the %%PLAUSR%% account, which can be done with +the following command: + + # pw userdel %%PLAUSR%% +EOMSG + if [ -d %%PREFIX%%/%%PLADIR%% ] ; then + echo " # rm -rf %%PREFIX%%/%%PLADIR%%/" + fi + echo + ;; +esac + +# +# That's All Folks! +# diff --git a/net/phpldapadmin/files/pkg-install.in b/net/phpldapadmin/files/pkg-install.in new file mode 100644 index 000000000000..b56e32ad6767 --- /dev/null +++ b/net/phpldapadmin/files/pkg-install.in @@ -0,0 +1,98 @@ +#!/bin/sh +# +# $FreeBSD: /tmp/pcvs/ports/net/phpldapadmin/files/pkg-install.in,v 1.1 2005-12-11 23:51:12 lawrance Exp $ +# + +PATH=/usr/sbin:/usr/bin:/bin ; export PATH + +pladir=%%PREFIX%%/%%PLADIR%% +plausr=%%PLAUSR%% +plagrp=%%PLAGRP%% + +plagcos="phpLDAPadmin Owner" +plahome=/nonexistent +plashell=/sbin/nologin + +create_group() { + local user group gcos home shell + + user=$1 + group=$2 + gcos=$3 + home=$4 + shell=$5 + + if pw groupadd -n $group ; then + echo "===> Group $group created" + else + cat <<-EOERRORMSG + *** Failed to create the $group group. + + Please add the $user user and $group group + manually with the commands: + + pw groupadd -n $group + pw useradd -n $user -g $group -c "$gcos" \\ + -d $home -s $shell -h - + + and retry installing this package. + EOERRORMSG + exit 1 + fi +} + + +create_user() { + local user group gcos home shell + + user=$1 + group=$2 + gcos=$3 + home=$4 + shell=$5 + + if pw useradd -n $user -g $group -c "$gcos" -d $home -s $shell -h - ; then + echo "===> Created $user user" + else + cat <<-EOERRORMSG + *** Failed to create the $user user. + + Please add the $user user manually with the command: + + pw useradd -n $user -g $group -c "$gcos" \\ + -d $home -s $shell -h - + + and retry installing this package. + EOERRORMSG + exit 1 + fi +} + + +case $2 in + PRE-INSTALL) + + # Create the pla user and group if they do not already exist + + if pw user show -n $plausr >/dev/null 2>&1 ; then + echo "===> Using pre-existing user $plausr" + else + if ! pw group show -n $plagrp >/dev/null 2>&1 ; then + create_group $plausr $plagrp "$plagcos" $plahome \ + $plashell + fi + create_user $plausr $plagrp "$plagcos" $plahome $plashell + fi + ;; + POST-INSTALL) + + # Change ownership of the phpLDAPadmin directory + + echo "===> Adjusting file ownership in $pladir" + chown -R $plausr:$plagrp $pladir || exit 1 + ;; +esac + +# +# That's All Folks! +# diff --git a/net/phpldapadmin/files/pkg-message.in b/net/phpldapadmin/files/pkg-message.in new file mode 100644 index 000000000000..365faf3c5f9f --- /dev/null +++ b/net/phpldapadmin/files/pkg-message.in @@ -0,0 +1,24 @@ + +%%PKGNAME%% has been installed into: + + %%PREFIX%%/%%PLADIR%% + +Please edit config.php to suit your needs. + +To make phpLDAPadmin available through your web site, +I suggest that you add the following to httpd.conf: + + Alias /phpldapadmin/ "%%PREFIX%%/%%PLADIR%%/htdocs" + +Please note: if you are upgrading from version 0.9.7 or earlier, the +layout of the %%PKGNAME%% files has been completely reworked. You +will need to modify your apache configuration and merge the settings +from your original configuration file: + + %%PREFIX%%/%%PLADIR%%/config.php + + to + + %%PREFIX%%/%%PLADIR%%/config/config.php + + |