mirror of
https://github.com/EDCD/EDDN.git
synced 2025-04-24 12:20:54 +03:00
systemd/start-eddn-service: Correct "is it actually running?" ps checks
Lack of '-p' meant it was just looking for ANY 'python' process, not on that PID.
This commit is contained in:
parent
e82c241464
commit
f968919029
@ -79,7 +79,7 @@ then
|
||||
|
||||
if [ -f "${LOG_DIR}/${SERVICE}.pid" ];
|
||||
then
|
||||
if ps -C python $(cat "${LOG_DIR}/${SERVICE}.pid") > /dev/null 2>&1;
|
||||
if ps -C python -p $(cat "${LOG_DIR}/${SERVICE}.pid") > /dev/null 2>&1;
|
||||
then
|
||||
echo "${SERVICE}: already running as PID $(cat "${LOG_DIR}/${SERVICE}.pid")" >&2
|
||||
exit ${EXIT_SERVICE_ALREADY_RUNNING}
|
||||
@ -105,7 +105,7 @@ else
|
||||
# We need to ensure there isn't already one, via the .pid file
|
||||
if [ -f "${LOG_DIR}/${SERVICE}.pid" ];
|
||||
then
|
||||
if ps -C python $(cat "${LOG_DIR}/${SERVICE}.pid") > /dev/null 2>&1;
|
||||
if ps -C python -p $(cat "${LOG_DIR}/${SERVICE}.pid") > /dev/null 2>&1;
|
||||
then
|
||||
echo "${SERVICE}: already running as PID $(cat "${LOG_DIR}/${SERVICE}.pid")" >&2
|
||||
exit ${EXIT_SERVICE_ALREADY_RUNNING}
|
||||
|
Loading…
x
Reference in New Issue
Block a user