mirror of
https://github.com/EDCD/EDDN.git
synced 2025-06-14 14:22:18 +03:00
systemd/start-eddn-service: Also check for existing process for not-source
This commit is contained in:
parent
b1ceccd850
commit
0c8a01fbbd
@ -76,6 +76,12 @@ then
|
||||
exit ${EXIT_SERVICE_BIN_MISSING}
|
||||
fi
|
||||
|
||||
if ps -C python $(cat "${LOG_DIR}/${SERVICE}.pid") > /dev/null 2>&1;
|
||||
then
|
||||
echo "${SERVICE}: already running as PID $(cat "${LOG_DIR}/${SERVICE}.pid")"
|
||||
exit ${EXIT_SERVICE_ALREADY_RUNNING}
|
||||
fi
|
||||
|
||||
${PYTHON_VENV}/bin/eddn-${SERVICE} --config "${CONFIG_OVERRIDE}" >> "${LOG_DIR}/${SERVICE}.log" 2>&1 &
|
||||
echo $! > "${LOG_DIR}/${SERVICE}.pid"
|
||||
wait $(cat "${LOG_DIR}/${SERVICE}.pid")
|
||||
|
Loading…
x
Reference in New Issue
Block a user