Added manual configuration through command line, finished function headers comments
This commit is contained in:
@@ -18,10 +18,10 @@ function die()
|
||||
trap - ERR
|
||||
|
||||
if [[ "$KEEPGOING" != "true" ]] || [[ "$2" == "--force" ]]; then
|
||||
prnt E "Sortie prématuré avec erreur (code #$errorcode)."
|
||||
exit $errorcode
|
||||
prnt E "Sortie prématuré avec erreur (code #$errorcode)."
|
||||
exit $errorcode
|
||||
else
|
||||
prnt W "On continue malgrés l'erreur #$errorcode."
|
||||
prnt W "On continue malgrés l'erreur #$errorcode."
|
||||
fi
|
||||
|
||||
# Put the trigger back (only executed with --keepgoing)
|
||||
@@ -31,6 +31,7 @@ export -f die
|
||||
|
||||
|
||||
# ------------------------------------------------------------------------------
|
||||
# Function trigered on Ctrl+C pressed or external kill affecting us
|
||||
function terminate()
|
||||
{
|
||||
prnt E "$1 reçu, sortie immédiate."
|
||||
@@ -89,3 +90,5 @@ check_root()
|
||||
die 4 --force
|
||||
fi
|
||||
}
|
||||
|
||||
# EOF
|
||||
|
||||
Reference in New Issue
Block a user