Skip to content
  • Zbigniew Jędrzejewski-Szmek's avatar
    systemd-activate: pass environment variables through · 5e65c93a
    Zbigniew Jędrzejewski-Szmek authored
    I need this to test half-installed socket-activated python
    script, which requires PYTHONPATH and LD_LIBRARY_PATH set.
    I assume that other people might find it useful to.
    
    -E VAR passes through VAR from the environment, while
    -E VAR=value sets VAR=value.
    
    systemd-activate -E PYTHONPATH=/var/tmp/inst1/usr/lib64/python3.3/site-packages -E LD_LIBRARY_PATH=/var/tmp/inst1/usr/lib -l 2000 python3 -c 'from systemd.daemon import listen_fds; print(listen_fds())'
    5e65c93a