convert init.d to systemd, how to determine which python is installed

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



HekaFS runs a daemon from init. It's a Bottle (python-based) http server.

In order to work on, e.g. RHEL6 in addition to Fedora, the old init 
script has:
...
vercmd="from distutils.sysconfig import get_python_lib; print 
get_python_lib()"
py_dir=$(python -c "${vercmd}")
exe="${py_dir}/hekafsd.py"
...

I'd kinda like to preserve that in some fashion in the new systemd 
service file. Not to run on RHEL6 obviously, but to be future-proof 
against the day when python2.8 or python3.x ships in F17 or later or 
RHEL7, e.g.

I read the various systemd.{unit,service,exec} man pages and also tried 
to find the conversion guide that was mentioned here a while back. 
Didn't see anything that looked suitable. Did I overlook something?

Thanks,

--

K

-- 
devel mailing list
devel@xxxxxxxxxxxxxxxxxxxxxxx
https://admin.fedoraproject.org/mailman/listinfo/devel



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Fedora Announce]     [Fedora Kernel]     [Fedora Testing]     [Fedora Formulas]     [Fedora PHP Devel]     [Kernel Development]     [Fedora Legacy]     [Fedora Maintainers]     [Fedora Desktop]     [PAM]     [Red Hat Development]     [Gimp]     [Yosemite News]
  Powered by Linux