From ed0717b3ad97c963eaa7757eb9daa76f8082ff48 Mon Sep 17 00:00:00 2001 From: kyodev Date: Wed, 6 Dec 2017 14:59:45 +0100 Subject: [PATCH] getIp 1.17.0 --- scripts/getIp | 10 ++++++---- scripts/getIp_changelog.md | 5 +++++ 2 files changed, 11 insertions(+), 4 deletions(-) diff --git a/scripts/getIp b/scripts/getIp index 044486c..6e48298 100755 --- a/scripts/getIp +++ b/scripts/getIp @@ -1,7 +1,7 @@ #!/bin/bash -version=1.16.2 -date="5/12/2017" +version=1.17.0 +date="6/12/2017" projet="simpledeb" contact="IRC freenode ##sdeb ou https://framagit.org/kyodev/kyopages/issues/" script="getIp" @@ -499,7 +499,7 @@ fscript_remove(){ # 4/12/2017 } # mise à jour script si dispo, v2, +update spécifique -fscript_update(){ # 4/12/2017 +fscript_update(){ # 6/12/2017 local dirTemp="/tmp/$script-$RANDOM" [ $(type -t fscript_update_special) ] && fscript_update_special # test, si fonction spécifique, appel @@ -515,7 +515,7 @@ fscript_update(){ # 4/12/2017 mkdir -p "$dirTemp" wget -q --tries=2 --timeout=15 -O "$dirTemp/$script" "$urlScript" if [ "$?" != "0" ]; then f__wget_test "$urlScript"; fi - if grep -q '#!/bin/bash' "$dirTemp/$script" ; then + if grep -q '#!/bin/bash' "$dirTemp/$script" && grep -q '^### END CONTROL' "$dirTemp/$script"; then cp -d "$dirTemp/$script" "$scriptInstall" chmod 775 "$scriptInstall" # rwx rwx r-x, proprio fu_user chown "$fu_user:" "$scriptInstall" @@ -654,6 +654,8 @@ done exit 0 +### END CONTROL (contrôle chargement) + wget -nv -O getIp https://frama.link/getip chmod +x getIp && ./getIp diff --git a/scripts/getIp_changelog.md b/scripts/getIp_changelog.md index c9cd17b..7b81069 100644 --- a/scripts/getIp_changelog.md +++ b/scripts/getIp_changelog.md @@ -9,6 +9,11 @@ --- +## 1.17.0 6/12/2017 + +* révision: fscript_update, controle chargement début et fin +* révision: changement séquence start pour éviter erreur cron + ## 1.16.2 5/12/2017 * nouveau: option - ( ou -46 ), ipv4 & ipv6