Get rid off dependency of lb-plugin on lb.client.
     yaimlog "Database jpis already exists"
   fi
 
+  . /opt/glite/etc/profile.d/grid-env.sh
   GLITE_LOCATION_VAR=${GLITE_LOCATION_VAR:-/var/glite}
   mkdir -p $GLITE_LOCATION_VAR   # Needed to store PID of JP IS server 
 
     echo "${GLITE_LOCATION}/etc/init.d/glite-jp-indexd" >> ${GLITE_LOCATION}/etc/gLiteservices
   fi
 
-  . /opt/glite/etc/profile.d/grid-env.sh
   ${GLITE_LOCATION}/etc/init.d/glite-jp-indexd stop
   ${GLITE_LOCATION}/etc/init.d/glite-jp-indexd start
 
 
     yaimlog "Database jpps already exists"
   fi
 
+  . /opt/glite/etc/profile.d/grid-env.sh
   GLITE_LOCATION_VAR=${GLITE_LOCATION_VAR:-/var/glite}
   mkdir -p $GLITE_LOCATION_VAR   # Needed to store PID of JPPS 
 
 
   touch ${GLITE_LOCATION}/etc/JPPS-peers
 
-  . /opt/glite/etc/profile.d/grid-env.sh
   ${GLITE_LOCATION}/etc/init.d/glite-jp-primary stop
   bash -x ${GLITE_LOCATION}/etc/init.d/glite-jp-primary start
 
 
 
 #include "glite/lb/jobstat.h"
 #include "glite/lb/events.h"
-#include "glite/lb/producer.h"
 #include "glite/lb/events_parse.h"