- cp htetc/handler.pl ${MASON_HANDLER}
- cp htetc/htpasswd.logout ${FREESIDE_CONF}
- [ ! -e ${MASONDATA} ] && mkdir ${MASONDATA} || true
- chown -R freeside ${MASONDATA}
+ install -D htetc/handler.pl ${MASON_HANDLER}
+ perl -p -i -e "\
+ s|%%%FREESIDE_EXPORT%%%|${FREESIDE_EXPORT}|g;\
+ s'%%%RT_ENABLED%%%'${RT_ENABLED}'g; \
+ " ${MASON_HANDLER} || true
+ mkdir -p ${FREESIDE_EXPORT}/profile
+ chown freeside ${FREESIDE_EXPORT}/profile
+ rm -rf ${MASONDATA}/*
+ mkdir ${MASONDATA}/cache || true
+ mkdir ${MASONDATA}/obj || true
+ chown -f -R freeside ${MASONDATA} || true