#!/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