#!/bin/sh

# below are commands to configure ippMonitor

# we have moved all user/password info into config.dat (see config.dat.in for an example)

# --site defines the location of the ipp configuration site-specific information
# note that we have a special version for ippmonitor without $PSCONFIG/$PSCONFDIR values:
# --site ~/ippconfig/ippmonitor.config

# set psconfig to use a different build from the standard ops tag.  This allows 
# testing of those parts of ippMonitor which depend on IPP code without modifyin
# the operational installation
# 2019.11.18 CCL: not sure which parts of ippMonitor depends on IPP codes?  If there is not many
#                 , just use trunk version should work fine.
psconfig ipp-trunk-20180515

# run psconfigure to generate Makefile and raw/site.php 
# $CZARPLOTDIR and $METRICSPLOTDIR will be generated a link in the same folder as ippMonitor  
psconfigure --htdocs /var/www/localhost/htdocs --site ~/ippconfig/ippmonitor.config

# copy these files and modify them (CCL removed CZARPLOTDIR)
cp config.dat.in config.dat

# install the php code:
# czartool_plots and ippMetrics will be linked to different path in different hostnames 
make

# for running czarpool.pl, 
cp czartool/czarconfig.xml.in czartool/czarconfig.xml
# then set gnuplot path for czartool_plots and ippMetrics in ippMonitor dir
# <path>/var/www/localhost/htdocs/ippMonitor/czartool_plots</path> 
# <savelocation>/var/www/localhost/htdocs/ippMonitor/ippMetrics</savelocation>
# enter czartool
./czarpool.pl

