[ic] Static pages to boost performance

Jonathan Melhuish interchange-users@icdevgroup.org
Tue Jun 24 14:50:01 2003


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Tuesday 24 June 2003 19:18, tech@mnwebdesign.com wrote:
> > That's a good idea!  Unfortunately it says
> > "./checkinterchange.sh: [: too many
> > arguments" when I run it.  What've I done wrong?
>
> Sorry I didn't write the script. It is part of my hosting package from
> Ed LaFrance.

Sorry, it got a bit munged somewhere between you email and my server and I 
mistakenly replaced the backticks with quotes!  Oops...

However, it seems to restart the server every time you run it like this, 
because ps ux doesn't show interchange on my machine - perhaps it's to do 
with the way it's running or something?

Anyway, it works now!  Cheers Ed 8-)

#!/bin/sh
var=`ps ax | grep interchange | grep -v -c grep`
if [ $var -eq 0 ];
then
  `su -f -c /usr/local/interchange/bin/restart interch > /dev/null;
   chown httpd.httpd /usr/local/interchange/etc/socket`
fi

Jon
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (GNU/Linux)

iD8DBQE++J0reTVvFHAhe5cRAixqAKCJMzHiRywxdTQsPbvYACSHxYb71wCglwYm
xg0qJPLeTXGf91Nae/osLRs=
=VFIe
-----END PGP SIGNATURE-----