[sf-perl] Running a perl script as a service
Quinn Weaver
quinn at fairpath.com
Fri Jan 11 08:07:34 PST 2008
On Fri, Jan 11, 2008 at 09:39:27AM -0600, Richard Reina wrote:
> Any ideas as to what I'm doing wrong? Thanks for any help.
I think the problem is this:
When you run it from the command line, it uses your personal
environment var settings, including your setting for PERL5LIB.
When it runs from your init.d script, it doesn't have your environment--
just a minimal env setup provided by the init system.
To avoid confusion, I would use an explicit path here:
> require "mail_processor.pl";
e.g. require '/path/to/mail_processor.pl';
HTH,
--
Quinn Weaver, independent contractor | President, San Francisco Perl Mongers
http://fairpath.com/quinn/resume/ | http://sf.pm.org/
510-520-5217
More information about the SanFrancisco-pm
mailing list