blob: 40494591944478b9e2546a216d3c350278725140 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
#! /bin/sh
#
# $NetBSD: INSTALL,v 1.2 2001/11/05 07:47:48 jlam Exp $
PKGNAME=$1
STAGE=$2
CAT="@CAT@"
CHMOD="@CHMOD@"
CP="@CP@"
ECHO="@ECHO@"
MKDIR="@MKDIR@"
TR="@TR@"
APACHE_SYSCONFDIR=@APACHE_SYSCONFDIR@
APC_GUI_DIR=${PKG_PREFIX}/@APC_GUI_DIR@
SAMPLECONFDIR=${PKG_PREFIX}/share/examples/@PKGBASE@
CONFFILES=" \
${SAMPLECONFDIR}/apc_gui.conf ${APACHE_SYSCONFDIR}/apc_gui.conf : \
/dev/null ${APC_GUI_DIR}/apc_config_local.php \
"
case ${STAGE} in
PRE-INSTALL)
;;
POST-INSTALL)
${MKDIR} ${APACHE_SYSCONFDIR}
${ECHO} "Installing configuration files:"
${ECHO} ${CONFFILES} | ${TR} ":" "\012" | while read SAMPLEFILE FILE
do
if [ -f ${FILE} ]
then
${ECHO} " ${FILE} already exists"
else
${ECHO} " ${FILE}"
${CP} ${SAMPLEFILE} ${FILE}
${CHMOD} 644 ${FILE}
fi
done
${CAT} << EOF
===========================================================================
You may wish to customize the following files:
EOF
${ECHO} ${CONFFILES} | ${TR} ":" "\012" | while read SAMPLEFILE FILE
do
${ECHO} " ${FILE}"
done
${CAT} << EOF
===========================================================================
EOF
;;
*)
${ECHO} "Unexpected argument: ${STAGE}"
exit 1
;;
esac
exit 0
|