Gestion du lancement du script par cron (sans $TERM)
This commit is contained in:
parent
601f77f9df
commit
7eb1a9e112
2 changed files with 7 additions and 4 deletions
|
@ -1,4 +1,4 @@
|
|||
#!/bin/bash -x
|
||||
#!/bin/bash
|
||||
|
||||
# Configuration
|
||||
generator=/home/files/scripts/generator.sh
|
||||
|
|
|
@ -9,9 +9,12 @@ webpath="$(echo "${1:-$PWD}" | sed "s#^$root/##g")"
|
|||
[[ "$webpath" =~ ^$root ]] && unset webpath
|
||||
|
||||
# Couleur de logs juste parce que c'est joli
|
||||
if [[ -n "$TERM" ]]
|
||||
then
|
||||
blue=$(tput setaf 4)
|
||||
green=$(tput setaf 2)
|
||||
reset=$(tput sgr0)
|
||||
fi
|
||||
|
||||
# Annonce du début du traitement
|
||||
echo "${blue}Start${reset} /$webpath"
|
||||
|
|
Loading…
Reference in a new issue