[ic] expireall not finding config file

Dave Barr barrd@mac.com
Wed, 25 Apr 2001 15:00:52 +0100

At 22:50 -0400 24/4/01, Mike Heins wrote:
>Quoting Dave Barr (barrd@mac.com):
>  > (IC 4.6.5, Debian 2.2.17, Perl 5.005-03)
>  > I realised the other day that my cron job set to expire catalog
>>  sessions was no longer working (the sessions dir was getting _BIG_):
>>  [snip crontab -l]
>  > 45 4 * * * /usr/local/interchange/bin/expireall -r
>>  [/snip]
>  > If run from the command line the script returns:
>  > Couldn't read interchange.cfg: No such file or directory
>  >
>>  I had a quick scan of the script itself and noticed that you could
>>  use the -f flag to point directly at a config file, I used the
>>  following on the command line and it worked...
>>  /usr/local/interchange/bin/expireall -f 
>>  [snip expireall line 103]
>>  open(GLOBAL, "< $Global::ConfigFile") or die "Couldn't read
>>  $Global::ConfigFile: $!\n";
>>  [/snip]
>>  The above makes the call to open the config file, but, and correct me
>>  if I'm wrong... ;)   Should it not be something like:
>>  open(FOO, "< $Global::VendRoot/$Global::ConfigFile") or die "blah $!\n";
>>                ^^^^^^^^^^^^^^^^^^
>>  Which would be the 'path to' and the 'name of' the config file?
>>  I dunno... I'm probably wrong as usual... :)
>I don't see a problem there.
>I think what you want, though, is
>45 4 * * * /usr/local/interchange/bin/expireall -r -u
>which will force unlinking of expired files.


Thanks for the reply Mike,

I believe there may be something wrong with my system ;) the script 
(expireall) has always worked "as is" until the last couple of 
months. I've been involved with a great deal of experimentation and 
have probably "screwed up" somewhere down the line. However, in case 
anyone reads this as a thread, I'll add that your suggestion is not 
strictly correct for 'expireall' but its brother 'expire'.

Both examples below work if run from the command line:
/usr/local/interchange/bin/expire -r -u -c _shop_name_
/usr/local/interchange/bin/expireall -f /usr/local/interchange/interchange.cfg

However, again from the command line (on my system):
/usr/local/interchange/bin/expireall -r
Produces the error "Couldn't read interchange.cfg: No such file or directory".

So I have added 1 line per shop in my crontab like so;
45 4 * * * /usr/local/interchange/bin/expire -r -u -c _shop_name_
And all is well...   8-)
Again, thanks, and 4.7 is looking goooooood ;)