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

Graham Whaley graham.whaley at gmail.com
Thu Oct 22 09:39:24 UTC 2015


I had a surf... looks like the recommended way is to create a file for
that service with the required settings, and pull it in in the script
- see:
http://unix.stackexchange.com/questions/44370/how-to-make-unix-service-see-environment-variables

 Graham

On 22 October 2015 at 10:17, David Morris <david.morris at 3gtelecoms.net> wrote:
> Hi All,
>
> Any idea how I set an environment variable for a service in Debian?
> I want to set the python path. This works fine when I SSH to my box and run
> "export PYTHONPATH=mypath" but this isn't available to services as it's only
> local to my shell.
> I'm presuming I can set the environment variables in the init.d config file
> for the service, but I can't see where.
>
> Thanks!
>
> David Morris
>
>
> _______________________________________________
> Wylug-discuss mailing list
> Wylug-discuss at wylug.org.uk
> https://mailman.lug.org.uk/mailman/listinfo/wylug-discuss
>



More information about the Wylug-discuss mailing list