Fist X run script. Config Astroport
This commit is contained in:
parent
3a758185d2
commit
634ece1a58
|
@ -0,0 +1,9 @@
|
|||
[Desktop Entry]
|
||||
Type=Application
|
||||
Exec=~/.zen/astroport/FirstXRUNconfig.sh
|
||||
X-GNOME-Autostart-enabled=true
|
||||
NoDisplay=false
|
||||
Hidden=false
|
||||
Name[fr_FR]=Astroport_X_config.desktop
|
||||
Comment[fr_FR]=First time RUN config script
|
||||
X-GNOME-Autostart-Delay=0
|
|
@ -0,0 +1,37 @@
|
|||
#!/bin/bash
|
||||
########################################################################
|
||||
# Author: Fred (support@qo-op.com)
|
||||
# Version: 2020.12.04
|
||||
# License: AGPL-3.0 (https://choosealicense.com/licenses/agpl-3.0/)
|
||||
########################################################################
|
||||
#
|
||||
# This script is run from ~/.config/autostart/Astroport_X_config.desktop
|
||||
#
|
||||
########################################################################
|
||||
# Create ~/.zen/secret(s) and ~/.zen/config
|
||||
#
|
||||
#
|
||||
[[ -f ~/.zen/config ]] && echo "CONFIG ALREADY DONE" && cat ~/.zen/config && exit 1
|
||||
|
||||
# Formulaire Login
|
||||
cfgpass=`zenity --forms \
|
||||
--title="Configuration ASTROPORT" \
|
||||
--text="Générer vos clefs de connexion" \
|
||||
--add-entry="Nom du profil Gchange" \
|
||||
--add-entry="Identifiants de connexion" \
|
||||
--add-password="Mots de passe" \
|
||||
--add-password="Confirmer mots de passe" \
|
||||
--separator="|"`
|
||||
|
||||
#Si on clique sur le bouton Annuler
|
||||
if [ "$?" -eq 1 ]; then
|
||||
#On quitte le script
|
||||
exit
|
||||
fi
|
||||
#Sinon on continue
|
||||
#On peut récupérer les valeurs des différents champs de cette façon :
|
||||
g1_profil=$(echo "$cfgpass" | cut -d "|" -f1) #Nom du profil Gchange
|
||||
g1_id=$(echo "$cfgpass" | cut -d "|" -f2) #Identifiants de connexion
|
||||
g1_pwd1=$(echo "$cfgpass" | cut -d "|" -f3) #Mot de passe | md5sum
|
||||
g1_pwd2=$(echo "$cfgpass" | cut -d "|" -f4) | md5sum #Confirmation du mot de passe
|
||||
|
Loading…
Reference in New Issue