#!/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 0 # LOGIN (=SALT) salt="$(~/.zen/astroport/zen/tools/diceware.sh 3 | xargs)" # PASS (=PEPPER) pepper="$(~/.zen/astroport/zen/tools/diceware.sh 3 | xargs)" g1_profil=$(zenity --entry --text "Nom de votre profil Gchange" --title "Astroport -- Profil" --entry-text="$(hostname)"); g1_salt=$(zenity --entry --text "Un peu de sel" --title "Astroport - Sel" --entry-text="$salt"); g1_pepper=$(zenity --entry --text "Un peu de poivre" --title "Astroport - Poivre" --entry-text="$pepper"); python3 ~/.zen/astroport/zen/tools/key_create_dunikey.py "$g1_salt" "$g1_pepper" g1pub=$(cat ~/.zen/secret.dunikey | grep "pub" | cut -d ' ' -f 2) g1priv=$(cat ~/.zen/secret.dunikey | grep "sec" | cut -d ' ' -f 2) cd ~/.zen/astroport/zen/tools/ ipfs_ID=$(python3 ./create_ipfsnodeid_from_tmp_secret.dunikey.py) zenity --info --width 300 --text "$ipfs_ID" echo $ipfs_ID > ~/.zen/secret.ipfs source ~/.zen/secret.ipfs