#!/bin/bash

# useage: "restart-lims" to restart fastcgi processes for all centres 
# or "restart-lims <centre>" to restart single centre, eg command-line or monit

for ctr in leeds uclh
do
	if test $1 && test $1 != $ctr 
	then 
		continue 
	fi
	
	/etc/init.d/lims_fastcgi_$ctr start tmp
	sleep 2
	/etc/init.d/lims_fastcgi_$ctr restart
	sleep 2
	/etc/init.d/lims_fastcgi_$ctr stop tmp	
done

# in .bashrc (.bash_aliases doesn't accept args):
function restart-lims() {
  cd /home/raj/apps/HILIS4 && sudo /etc/init.d/restart-lims $@
}
