problems with init.d script via cron

Jason Joines joines
Mon Aug 23 16:21:04 PDT 2004


	I have an init.d script that works fine interactively.  That is I can use it to start, stop, restart, etc., the service via "/etc/init.d/scriptname arguments" from a command prompt.  However, it fails when run from cron.

	It has these variables and start line:
CONFIGDIR=/etc/rembo
CONFIGFILE=rembo.conf
BINDIR=/opt/rembo
BINFILE=rembo
startproc $BINDIR/$BINFILE -v 4 -c $CONFIGDIR/$CONFIGFILE

	I need to have cron restart this service nightly after some files are updated.  When I try to have cron do it the start line generates this error:
cannot stat `/etc/rembo/.conf': No such file or directory

	Looks like it's dropping the part between the front slash and the period.  I've tried all sorts of quotations and such but no luck so far.  Any ideas how to make this behave?


Jason Joines
=================================



More information about the Linux-users mailing list