freebsd-ports/net-mgmt/zenoss/files/pkg-install.in
Chris Rees 295be1c105 An open source application, server and network management platform based on the
Zope application server.

WWW: http://zenoss.com/

PR:		ports/156655
Submitted by:	Phil Phillips <phil@experts-exchange.com>
Approved by:	rene (mentor)
2011-07-21 16:55:07 +00:00

43 lines
960 B
Bash

#!/bin/sh
#
# $FreeBSD$
#
# pkg-install.in for zenoss
CP="/bin/cp -p"
CHOWN="/usr/sbin/chown"
ECHO="/bin/echo"
MKDIR="/bin/mkdir -p"
SED="/usr/bin/sed"
FIND="/usr/bin/find"
DIRECTORIES="export
Products/ZenModel/ZenPackTemplate/CONTENT/skins
Products/ZenModel/ZenPackTemplate/CONTENT/daemons
Products/ZenModel/ZenPackTemplate/CONTENT/reports
Products/ZenModel/ZenPackTemplate/CONTENT/objects
lib/python2.6/lib-old
lib/gio/modules
share/mibs/site
share/pibs/ietf
share/pibs/tubs
share/pibs/site
share/rrdtool
var/cache/fontconfig"
if [ "$2" = "POST-INSTALL" ]; then
# Make sure empty directories are created
cd %%ZENHOME%%
for i in $DIRECTORIES; do
${MKDIR} -m 0755 $i
${CHOWN} zenoss:zenoss $i
done
# If config file doesn't exist, then copy it from example
cd %%ZENHOME%%/etc
for i in *.example; do
[ -e $conf ] || ${CP} $i ${i%.example}
done
${FIND} %%ZENHOME%% -type d -exec ${CHOWN} zenoss:zenoss \{\} \;
fi