From: Ricardo Markiewicz Date: Sun, 24 Oct 2004 00:41:27 +0000 (+0000) Subject: empiezan a tomar forma los paths X-Git-Tag: svn_import~92 X-Git-Url: https://git.llucax.com/z.facultad/75.08/llamadas.git/commitdiff_plain/81dcedde06b23015a43d2af31f7c149cf40cbb59?ds=inline;hp=9c69707e6753f7e8d02b86e70a5ea250f00ea5d1 empiezan a tomar forma los paths --- diff --git a/inst/util.sh b/inst/util.sh index 1d9219c..2c159f5 100755 --- a/inst/util.sh +++ b/inst/util.sh @@ -1,5 +1,8 @@ #/bin/sh +BASE_DIR="$HOME/.antifraude" +LOCK_DIR="$BASE_DIR/lock" + # Lee del teclado un valor # # parĂ¡metros : @@ -57,18 +60,18 @@ lock () { echo "No" return fi - echo "lero lero" > "$INST_DIR/lock/$1.pid" + echo "$$" > "$LOCK_DIR/$1.pid" } # Desbloquea el script unlock () { - rm -rf "$INST_DIR/lock/$1.pid" + rm -rf "$LOCK_DIR/$1.pid" } # Consulta si un script esta lockeado is_lock () { - if [ -e "$INST_DIR/lock/$1.pid" ] ; then + if [ -e "$LOCK_DIR/$1.pid" ] ; then # Lock file encontrado! return 0 fi