On Thu, 2011-11-03 at 10:10 -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}/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.
Generate the actual systemd service file at rpmbuild time. Something
like this maybe, if you're using the standard magic for
%{python_sitelib}:
Source1: hekafs.service.in
...
sed s/@PYTHON_SITELIB@/%{python_sitelib}/ %{SOURCE1} >
$RPM_BUILD_ROOT/lib/systemd/system/hekafs.service
- ajax