[sf-perl] Running a perl script as a service

Richard Reina gatorreina at gmail.com
Mon Jan 14 08:33:21 PST 2008


Thanks for all the replies.  Putting the full path in fixed the problem.

Thanks again.

On Jan 11, 2008 10:07 AM, Quinn Weaver <quinn at fairpath.com

> 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
> _______________________________________________
> SanFrancisco-pm mailing list
> SanFrancisco-pm at pm.org
> http://mail.pm.org/mailman/listinfo/sanfrancisco-pm
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.pm.org/pipermail/sanfrancisco-pm/attachments/20080114/0a2bef1d/attachment.html 


More information about the SanFrancisco-pm mailing list