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

Toshio Kuratomi a.badger at
Thu Nov 3 15:39:16 UTC 2011

On Thu, Nov 03, 2011 at 10:10:03AM -0400, Kaleb S. KEITHLEY wrote:
> 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}/"
> ...
> 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?
A wrapper script that does this would be one method.

If I understand how hekafsd is structured, another might be to run::
   python -m hekafsd

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: not available
Url : 

More information about the devel mailing list