mirror of
https://github.com/EDCD/EDDN.git
synced 2025-04-12 07:00:04 +03:00
start-eddn-service: User $USER instead of hard-coded value
This commit is contained in:
parent
ffc07e92cf
commit
d8ac2bc6b2
@ -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}
|
||||
|
Loading…
x
Reference in New Issue
Block a user