first commit
This commit is contained in:
65
scripts/hashes.sh
Executable file
65
scripts/hashes.sh
Executable file
@@ -0,0 +1,65 @@
|
||||
#!/bin/bash
|
||||
lescript=`basename $0 .sh`
|
||||
flag=$TMP_PATH/bot_$lescript.flag
|
||||
|
||||
#
|
||||
# TOOLS
|
||||
#
|
||||
function debug
|
||||
{
|
||||
if [ -f $FLAG_PATH/debug ]
|
||||
then
|
||||
echo $1
|
||||
fi
|
||||
}
|
||||
|
||||
function sortie
|
||||
{
|
||||
if [ -f $flag ]
|
||||
then
|
||||
rm -f $flag
|
||||
fi
|
||||
exit $1
|
||||
}
|
||||
|
||||
function succes
|
||||
{
|
||||
debug "SUCCES"
|
||||
sortie 0
|
||||
}
|
||||
|
||||
function echec
|
||||
{
|
||||
debug "ECHEC"
|
||||
sortie 1
|
||||
}
|
||||
|
||||
#
|
||||
# TEST DU FLAG
|
||||
#
|
||||
if [ -f $flag ]
|
||||
then
|
||||
debug "$0 is already running !"
|
||||
exit 1
|
||||
fi
|
||||
touch $flag
|
||||
|
||||
#
|
||||
# PARAMETRES PAR FICHIER FLAGS
|
||||
#
|
||||
if [ -f $FLAG_PATH/no_hashes ]
|
||||
then
|
||||
debug "No Hashes"
|
||||
echec
|
||||
fi
|
||||
|
||||
#
|
||||
# Toujours placer la version HASHES
|
||||
#
|
||||
debug "Compute HASHES ..."
|
||||
$APPS_PATH/methode/hashes/robot.sh
|
||||
|
||||
#
|
||||
# SORTIE AVEC SUCCES
|
||||
#
|
||||
succes
|
||||
Reference in New Issue
Block a user