- Ajout de la mise à jour automatique du script (fix)
This commit is contained in:
parent
754ed75e20
commit
886bb9a68c
22
TODO.md
22
TODO.md
|
|
@ -1,27 +1,5 @@
|
|||
>>> AJOUTER LE SCRIPT D UPDATE DANS LE CRON 1 fois par jour ?
|
||||
|
||||
|
||||
BUG SMTP PROXMOX
|
||||
|
||||
# BUG SCRIPT
|
||||
⚡ [3/6] Liaison et génération du certificat...
|
||||
/etc/profile.d/func/deb_sys.sh: line 595: step: command not found
|
||||
mkdir: cannot create directory ‘/etc/ssl/wildcard’: Permission denied
|
||||
/etc/profile.d/func/deb_sys.sh: line 604: step: command not found
|
||||
|
||||
🚀 Configuration de l'heure (Paris) et du NTP...
|
||||
Failed to create bus connection: No such file or directory
|
||||
🚀 Fuseau horaire réglé sur Europe/Paris.
|
||||
Failed to create bus connection: No such file or directory
|
||||
Failed to restart systemd-timesyncd.service: Unit systemd-timesyncd.service not found.
|
||||
|
||||
--- Changer le Hostname ---
|
||||
Nom actuel : zabbix
|
||||
Nouveau Hostname (FQDN recommandé, ex: machine.domaine.com) : zabbix.server.home
|
||||
Failed to create bus connection: No such file or directory
|
||||
|
||||
|
||||
|
||||
## Passer à ZABBIX
|
||||
|
||||
> mettre le script
|
||||
|
|
|
|||
12
func/git.sh
12
func/git.sh
|
|
@ -63,14 +63,14 @@ gitssl() {
|
|||
script_update() {
|
||||
local BRANCH LOCAL REMOTE current_path
|
||||
|
||||
current_path=$(pwd)
|
||||
current_path="$PWD"
|
||||
|
||||
cd "$WELCOME_SCRIPT_PATH" || return 2
|
||||
|
||||
git fetch origin >/dev/null 2>&1
|
||||
if [ $? -ne 0 ]; then
|
||||
msg_error "Erreur lors du Fetch"
|
||||
cd "$current_path"
|
||||
cd "$current_path" || :
|
||||
return 3
|
||||
fi
|
||||
|
||||
|
|
@ -78,8 +78,8 @@ script_update() {
|
|||
LOCAL=$(git rev-parse HEAD)
|
||||
REMOTE=$(git rev-parse origin/"$BRANCH")
|
||||
|
||||
if [ "$LOCAL" = "$REMOTE" ]; then
|
||||
cd "$current_path"
|
||||
if [ "$LOCAL" = "$REMOTE" ] && git diff --quiet && git diff --cached --quiet; then
|
||||
cd "$current_path" || :
|
||||
return 0
|
||||
fi
|
||||
|
||||
|
|
@ -89,11 +89,11 @@ script_update() {
|
|||
if [ $? -eq 0 ]; then
|
||||
msg_success "Les script de welcome a été mis à jour !! relancer le ssh pour profiter des nouvelles fonctionnalités"
|
||||
echo ""
|
||||
cd "$current_path"
|
||||
cd "$current_path" || :
|
||||
return 1
|
||||
else
|
||||
msg_error "Erreur lors de la mise à jour du script"
|
||||
cd "$current_path"
|
||||
cd "$current_path" || :
|
||||
return 4
|
||||
fi
|
||||
}
|
||||
Loading…
Reference in New Issue