X-Git-Url: https://git.llucax.com/z.facultad/75.08/llamadas.git/blobdiff_plain/db6fa63db0210fe6306e52da4390e53415ece6b9..7d5d536d23cfcf84b10def316ced75a5df6cb3b1:/inst/afimonio_daemon.sh?ds=sidebyside diff --git a/inst/afimonio_daemon.sh b/inst/afimonio_daemon.sh index 1aee8ff..ac0fd0c 100755 --- a/inst/afimonio_daemon.sh +++ b/inst/afimonio_daemon.sh @@ -11,8 +11,10 @@ help () { case "$1" in "start") - echo "Iniciando demonio 'afimonio' en modo daemon ..." - nohup "$AFIMONIO_BINDIR/afimonio" & 2>&1 > /dev/null + 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" ;; "stop") if ! is_lock "afimonio" ; then @@ -20,11 +22,11 @@ case "$1" in exit 0 fi echo "Parando el demonio 'afimonio' ..." - A_PID=`cat "$HOME/lock/afimonio.pid"` + A_PID=`cat "$BASE_DIR/lock/afimonio.pid"` kill $A_PID ;; "status") - A_PID=`cat "$HOME/lock/afimonio.pid"` + A_PID=`cat "$BASE_DIR/lock/afimonio.pid"` if is_lock "afimonio" ; then echo "Afimonio está corriendo actualmente (PID=$A_PID)." else