[Wylug-discuss] Setting environment variable for service in Debian

Graham Whaley graham.whaley at gmail.com
Thu Oct 22 10:44:11 UTC 2015


Nothing is springing to mind. That leads me to a new question though
.... how does one debug startup scripts?
My natural feeling is to litter them with 'echo' (for 'set +x') and
hope it comes out in a log somewhere, and/or check the man pages to
see if there is a debug/verbose setting for the daemon etc.
I'm sure others have some experience here?

That is - you might want to figure out if the script is actually
pulling in your file or not.


 Graham

On 22 October 2015 at 10:58, David Morris <david.morris at 3gtelecoms.net> wrote:
> Thanks Graham,
>
> I had found that but it doesn't seem to work. I tried adding
> PYTHONPATH=mypath
> export PYTHONPATH=mypath
>
> to the /etc/default/freeswitch file (which already existed), but when I
> restart my service freeswitch it doesn't seem to have the pythonpath set.
> The settings file already is included from the init.d/freeswitch script
> using "[ -r /etc/default/$NAME ] && . /etc/default/$NAME"
> If I quit the service, set my shell PYTHONPATH and then run freeswitch in my
> shell (not as a service) then it does have the variable set correctly.
> Any idea?
>
> Thanks,
>
> David
>



More information about the Wylug-discuss mailing list