mirror of
https://github.com/EDCD/EDDN.git
synced 2025-06-08 11:22:13 +03:00
contrib/systemd: Adjusted service file and script for python venv
This commit is contained in:
parent
415f5bb17d
commit
4c2f379480
@ -1,3 +1,3 @@
|
|||||||
CONFIG_OVERRIDE="${HOME}/.local/share/eddn/config.json"
|
CONFIG_OVERRIDE="${HOME}/.local/share/eddn/config.json"
|
||||||
LOG_DIR="${HOME}/.var/log/eddn"
|
LOG_DIR="${HOME}/.var/log/eddn"
|
||||||
PYTHON_VENV_ACTIVATE="${HOME}/eddn/python2.7-venv/bin/activate"
|
PYTHON_VENV="${HOME}/eddn/python-venv"
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/bin/bash -x
|
#!/bin/sh
|
||||||
# vim: tabstop=2 shiftwidth=2 textwidth=0 wrapmargin=0 expandtab
|
# vim: tabstop=2 shiftwidth=2 textwidth=0 wrapmargin=0 expandtab
|
||||||
#
|
#
|
||||||
# Start an EDDN Service, including redirecting output to a log file.
|
# Start an EDDN Service, including redirecting output to a log file.
|
||||||
@ -26,12 +26,12 @@ fi
|
|||||||
. ./eddn_config
|
. ./eddn_config
|
||||||
|
|
||||||
# Use the python venv
|
# Use the python venv
|
||||||
. "${PYTHON_VENV_ACTIVATE}"
|
. "${PYTHON_VENV}/bin/activate"
|
||||||
|
|
||||||
if [ ! -f eddn-${SERVICE} ];
|
if [ ! -f "${PYTHON_VENV}/bin/${SERVICE}" ];
|
||||||
then
|
then
|
||||||
echo "eddn-${SERVICE} is missing from $(pwd)"
|
echo "${SERVICE} is missing from ${PYTHON_VENV}/bin"
|
||||||
exit 2
|
exit 2
|
||||||
fi
|
fi
|
||||||
|
|
||||||
./eddn-${SERVICE} --config "${CONFIG_OVERRIDE}" >> "${LOG_DIR}/eddn-${SERVICE}.log" 2>&1
|
${PYTHON_VENV}/bin/${SERVICE} --config "${CONFIG_OVERRIDE}" >> "${LOG_DIR}/${SERVICE}.log" 2>&1
|
||||||
|
Loading…
x
Reference in New Issue
Block a user