From 1845728ea7fe68a24c7b10c6fee76033bd977d0d Mon Sep 17 00:00:00 2001 From: Leandro Lucarella Date: Sun, 24 Oct 2004 22:56:01 +0000 Subject: [PATCH] bugfix y se usar lock_pid. --- inst/afimonio_daemon.sh | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/inst/afimonio_daemon.sh b/inst/afimonio_daemon.sh index ac0fd0c..b66a922 100755 --- a/inst/afimonio_daemon.sh +++ b/inst/afimonio_daemon.sh @@ -13,22 +13,19 @@ case "$1" in "start") echo -n "Iniciando demonio 'afimonio' en modo daemon ..." nohup "$AFIM_BINDIR/afimonio" > /dev/null & - A_PID=`cat "$BASE_DIR/lock/afimonio.pid"` - echo " con PID=$A_PID" + echo " (PID=`lock_pid afimonio`)" ;; "stop") - if ! is_lock "afimonio" ; then + if ! is_lock afimonio; then echo "El demonio no esta corriendo ... Abortando" exit 0 fi echo "Parando el demonio 'afimonio' ..." - A_PID=`cat "$BASE_DIR/lock/afimonio.pid"` - kill $A_PID + kill `lock_pid afimonio` ;; "status") - A_PID=`cat "$BASE_DIR/lock/afimonio.pid"` - if is_lock "afimonio" ; then - echo "Afimonio está corriendo actualmente (PID=$A_PID)." + if is_lock afimonio; then + echo "Afimonio está corriendo actualmente (PID=`lock_pid afimonio`)." else echo "Afimonio no está corriendo." fi -- 2.43.0