Loading Demande_Batiment.desktop 0 → 100755 +12 −0 Original line number Diff line number Diff line #!/usr/bin/env xdg-open [Desktop Entry] Name=Gimaweb Comment=Aller sur gimaweb et générer un code TOTP Exec=/opt/primtux-eole/gimaweb.sh Icon=administration Terminal=false Type=Application StartupNotify=false Categories=Network;RemoteAccess; Name[fr_FR]=Demande Batiment gimaweb.sh 0 → 100755 +17 −0 Original line number Diff line number Diff line #!/bin/bash if [ -z "$(which oathtool)" ] then apt-get update apt-get -y install oathtool fi file="/home/direction/Documents/Partages_Serveur/CONFIDENTIEL_DIRECTION/.gimaweb_secret.totp" secret=$(cat $file) if [ -z "$secret" ] then secret=$(zenity --title "Connexion Gimaweb" --text "Veuillez entrer la clé secrete indiquée par auth.lametro.fr" --entry) echo $secret > $file else firefox https://gimaweb-demandes.lametro.fr & fi code=$(oathtool --totp --base32 $secret) zenity --info --text "Votre code temporaire est : $code" --title "Votre code TOTP" Loading
Demande_Batiment.desktop 0 → 100755 +12 −0 Original line number Diff line number Diff line #!/usr/bin/env xdg-open [Desktop Entry] Name=Gimaweb Comment=Aller sur gimaweb et générer un code TOTP Exec=/opt/primtux-eole/gimaweb.sh Icon=administration Terminal=false Type=Application StartupNotify=false Categories=Network;RemoteAccess; Name[fr_FR]=Demande Batiment
gimaweb.sh 0 → 100755 +17 −0 Original line number Diff line number Diff line #!/bin/bash if [ -z "$(which oathtool)" ] then apt-get update apt-get -y install oathtool fi file="/home/direction/Documents/Partages_Serveur/CONFIDENTIEL_DIRECTION/.gimaweb_secret.totp" secret=$(cat $file) if [ -z "$secret" ] then secret=$(zenity --title "Connexion Gimaweb" --text "Veuillez entrer la clé secrete indiquée par auth.lametro.fr" --entry) echo $secret > $file else firefox https://gimaweb-demandes.lametro.fr & fi code=$(oathtool --totp --base32 $secret) zenity --info --text "Votre code temporaire est : $code" --title "Votre code TOTP"