From d8ac2bc6b24dd33f186864ed083af46dd5d8c298 Mon Sep 17 00:00:00 2001 From: Athanasius Date: Fri, 9 Jul 2021 08:44:27 +0000 Subject: [PATCH] start-eddn-service: User $USER instead of hard-coded value --- systemd/start-eddn-service | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/systemd/start-eddn-service b/systemd/start-eddn-service index c8fb1f3..cfdd490 100755 --- a/systemd/start-eddn-service +++ b/systemd/start-eddn-service @@ -129,7 +129,7 @@ then if [ -f "${LOG_DIR}/${SERVICE}.pid" ]; then - if check_process "$(cat ${LOG_DIR}/${SERVICE}.pid)" eddn eddn-${SERVICE} ; + if check_process "$(cat ${LOG_DIR}/${SERVICE}.pid)" "${USER}" eddn-${SERVICE} ; then echo "${SERVICE}: already running as PID $(cat "${LOG_DIR}/${SERVICE}.pid")" >&2 exit ${EXIT_SERVICE_ALREADY_RUNNING} @@ -155,7 +155,7 @@ else # We need to ensure there isn't already one, via the .pid file if [ -f "${LOG_DIR}/${SERVICE}.pid" ]; then - if check_process "$(cat ${LOG_DIR}/${SERVICE}.pid)" eddn eddn-${SERVICE} ; + if check_process "$(cat ${LOG_DIR}/${SERVICE}.pid)" "${USER}" eddn-${SERVICE} ; then echo "${SERVICE}: already running as PID $(cat "${LOG_DIR}/${SERVICE}.pid")" >&2 exit ${EXIT_SERVICE_ALREADY_RUNNING}