ViewVC Help
View File | Revision Log | Show Annotations | Download File | View Changeset | Root Listing
root/mports/trunk/mail/squirrelmail/files/pkg-install.in
Revision: 16349
Committed: Sun Apr 20 18:32:36 2014 UTC (10 years ago) by laffer1
File size: 1287 byte(s)
Log Message:
remove cvs2svn:cvs-rev prop

File Contents

# Content
1 #!/bin/sh
2 # $MidnightBSD$
3
4 PKG_BATCH=${BATCH:=NO}
5 PKG_PREFIX=${PKG_PREFIX:=/usr/local}
6
7 SQUIRRELDIR=%%SQUIRRELDIR%%
8
9 case $2 in
10 PRE-INSTALL)
11 USER=www
12 GROUP=${USER}
13 UID=80
14 GID=${UID}
15
16 if ! pw groupshow "${GROUP}" 2>/dev/null 1>&2; then
17 if pw groupadd ${GROUP} -g ${GID}; then
18 echo "Added group \"${GROUP}\"."
19 else
20 echo "Adding group \"${GROUP}\" failed..."
21 exit 1
22 fi
23 fi
24
25 if ! pw usershow "${USER}" 2>/dev/null 1>&2; then
26 if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \
27 -s "/sbin/nologin" -d "/nonexistent" \
28 -c "World Wide Web Owner"; \
29 then
30 echo "Added user \"${USER}\"."
31 else
32 echo "Adding user \"${USER}\" failed..."
33 exit 1
34 fi
35 fi
36
37 exit 0
38 ;;
39 POST-INSTALL)
40 if [ "${PKG_BATCH}" = "NO" ]; then
41 install -d -o www -g www -m 0755 /var/spool/squirrelmail
42 install -d -o www -g www -m 0730 /var/spool/squirrelmail/attach
43 install -d -o www -g www -m 0750 /var/spool/squirrelmail/pref
44 if [ ! -f /var/spool/squirrelmail/pref/default_pref ]; then
45 cp -rp ${SQUIRRELDIR}/data/default_pref \
46 /var/spool/squirrelmail/pref/default_pref
47 else
48 echo ""
49 echo "An older version of default_pref exists in"
50 echo "/var/spool/squirrelmail/pref, you may want to"
51 echo "compare it with the one in ${SQUIRRELDIR}/data"
52 fi
53 fi
54 ;;
55 esac

Properties

Name Value
svn:executable *