]> git.llucax.com Git - z.facultad/75.08/llamadas.git/commitdiff
empiezan a tomar forma los paths
authorRicardo Markiewicz <gazer.arg@gmail.com>
Sun, 24 Oct 2004 00:41:27 +0000 (00:41 +0000)
committerRicardo Markiewicz <gazer.arg@gmail.com>
Sun, 24 Oct 2004 00:41:27 +0000 (00:41 +0000)
inst/util.sh

index 1d9219ceceaeb127cf01c3229e3d240caac067c4..2c159f5b02cd82fb286edf7558cda7291d7636fe 100755 (executable)
@@ -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