G1SMS
This commit is contained in:
parent
52e7ddb7bd
commit
bfbd44509e
|
@ -29,9 +29,18 @@ else
|
|||
export G1SMS="YES"
|
||||
fi
|
||||
|
||||
echo "
|
||||
_ _ __
|
||||
(_)___ (_) /_
|
||||
/ / __ \/ / __/
|
||||
/ / / / / / /_
|
||||
/_/_/ /_/_/\__/
|
||||
|
||||
g1sms $G1SMS
|
||||
"
|
||||
|
||||
export YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1);
|
||||
cd $MY_PATH
|
||||
|
||||
##################################################################
|
||||
# Activate logging to /tmp/g1sms.log (YES/NO)
|
||||
export DOLOG="YES"
|
||||
|
@ -66,7 +75,6 @@ fi
|
|||
export ADMINPSEUDO="Fred"
|
||||
##################################################################
|
||||
# DUNITER/CESIUM+ DEFAULT SERVERS
|
||||
|
||||
export DUNITER="https://g1.duniter.org"
|
||||
export CESIUM="https://g1.data.le-sou.org"
|
||||
##################################################################
|
||||
|
|
|
@ -16,8 +16,32 @@ YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail
|
|||
IPFSNODEID=$(ipfs id -f='<id>\n')
|
||||
NANODATE=$(date -u +%s%N) #1569692075385428020
|
||||
|
||||
echo "
|
||||
$NANODATE
|
||||
_ _ __ __
|
||||
(_)___ (_) /_ / /_____ __ _______
|
||||
/ / __ \/ / __/ / //_/ _ \/ / / / ___/
|
||||
/ / / / / / /_ / ,< / __/ /_/ (__ )
|
||||
/_/_/ /_/_/\__/ /_/|_|\___/\__, /____/
|
||||
/____/
|
||||
|
||||
$YOU on $IPFSNODEID ipfs node
|
||||
|
||||
"
|
||||
|
||||
##################################################################
|
||||
# G1sms+ Node KEYS (G1wallet, gpg, IPNS)
|
||||
echo '
|
||||
|
||||
________ ___________ ____ _ __ __
|
||||
/ _/ __ \/ ____/ ___// __ \_____(_) __/ //_/__ __ __
|
||||
/ // /_/ / /_ \__ \/ /_/ / ___/ / | / / ,< / _ \/ / / /
|
||||
_/ // ____/ __/ ___/ / ____/ / / /| |/ / /| / __/ /_/ /
|
||||
/___/_/ /_/ /____/_/ /_/ /_/ |___/_/ |_\___/\__, /
|
||||
/____/
|
||||
Formed with 24 first char IPFS .Identity.PrivKey
|
||||
Used as gpg symetric key (soon deprecated?)
|
||||
'
|
||||
##################################################################
|
||||
IPFSPrivKey=$(cat ~/.ipfs/config | jq -r '.Identity.PrivKey') #"
|
||||
export IPFSPrivKey="${IPFSPrivKey:0:24}" #
|
||||
|
@ -33,6 +57,7 @@ if [ ! $IPFSPrivKey ]; then echo "FATAL ERROR:: IPFS Node.Identity.PrivKey IPFSP
|
|||
if [[ ! -f ~/.zen/ipfs/.$IPFSNODEID/G1SSB/_uidna ]]; then
|
||||
# CREATE NODE G1 KEYS AND FILES
|
||||
mkdir -p ~/.zen/ipfs/.$IPFSNODEID/TASK
|
||||
|
||||
####################################################################
|
||||
# GIVE NAME TO NODE G1 WALLET: "6789diceware"
|
||||
# And write ~/.zen/g1sms_wallets/.Qm***/G1SSB/(_files)
|
||||
|
@ -42,12 +67,22 @@ if [[ ! -f ~/.zen/ipfs/.$IPFSNODEID/G1SSB/_uidna ]]; then
|
|||
# Check if already existing among all swarm wallets G1SSB or G1SMS
|
||||
while [[ $(grep -Rwl "$PRE$ZUID" ~/.zen/ipfs_swarm/.*/*/_uidna) ]]; do ZUID=$($MY_PATH/diceware.sh 1 | xargs); done
|
||||
NODE_UIDNA="$PRE$ZUID"
|
||||
NODE_PIN=$($MY_PATH/diceware.sh | xargs)
|
||||
|
||||
echo "
|
||||
__ __________ _ _____
|
||||
/ / / / _/ __ \/ | / / |
|
||||
/ / / // // / / / |/ / /| |
|
||||
/ /_/ // // /_/ / /| / ___ |
|
||||
\____/___/_____/_/ |_/_/ |_|
|
||||
|
||||
$NODE_UIDNA
|
||||
"
|
||||
|
||||
[[ -f ~/.zen/secret.astroport.key ]] \
|
||||
&& [[ ! $(cat ~/.zen/secret.astroport.key | grep -F 'NODE_UIDNA' )]] \
|
||||
&& chmod 600 ~/.zen/secret.astroport.key
|
||||
&& echo "NODE_UIDNA=$NODE_UIDNA" >> ~/.zen/secret.astroport.key
|
||||
&& chmod 600 ~/.zen/secret.astroport.key \
|
||||
&& echo "NODE_UIDNA=$NODE_UIDNA" >> ~/.zen/secret.astroport.key \
|
||||
|| echo "ERROR NO ~/.zen/secret.astroport.key !!" && exit 1
|
||||
|
||||
source ~/.zen/secret.astroport.key
|
||||
|
||||
|
@ -82,7 +117,9 @@ fi
|
|||
|
||||
## INIT NODE G1 PUB & PRIV KEY
|
||||
NODE_G1PUBKEY=$ZENG1
|
||||
[[ ! $NODE_G1PUBKEY ]] && echo "Missing NODE_G1PUBKEY" && exit 1
|
||||
NODE_PUBSECFILE="~/.ssb/secret.dunikey"
|
||||
[[ ! $NODE_PUBSECFILE ]] && echo "Missing NODE_PUBSECFILE" && exit 1
|
||||
|
||||
##########################################################
|
||||
# MEMORIZE NODE NANODATE EXECUTION TIME (for ntpdate regular sync)
|
||||
|
|
Loading…
Reference in New Issue