convert init.d to systemd, how to determine which python is installed
Kaleb S. KEITHLEY
kkeithle at redhat.com
Thu Nov 3 14:10:03 UTC 2011
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
More information about the devel
mailing list