From c6c796485c1f0545d743c360a6cf3c568084ace8 Mon Sep 17 00:00:00 2001 From: qo-op Date: Thu, 28 Jan 2021 23:55:04 +0100 Subject: [PATCH] Add XZUID to ~/.bashrc --- .install/update_bashrc.sh | 5 +++-- ISOconfig.sh | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.install/update_bashrc.sh b/.install/update_bashrc.sh index ab72ef9..9a45e24 100755 --- a/.install/update_bashrc.sh +++ b/.install/update_bashrc.sh @@ -6,7 +6,7 @@ ######################################################################## # update_bashrc.sh # Add $YOU $IPFSNODEID $G1PUB to ~/.bashrc - +XZUID="$1" source ~/.bashrc newYOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1) || er+=" ipfs daemon not running" @@ -20,12 +20,12 @@ if [[ $YOU != "" && $IPFSNODEID != "" && $G1PUB != "" ]]; then sed -i "s/YOU=$YOU/YOU=$newYOU/g" ~/.bashrc sed -i "s/$G1PUB/$newG1PUB/g" ~/.bashrc sed -i "s/$IPFSNODEID/$newIPFSNODEID/g" ~/.bashrc + if [[ $IPNSKEY == "_IPNSKEY_" ]]; then ipfs key rm xbian IPNSKEY=$(ipfs key gen xbian) sed -i "s/_IPNSKEY_/$IPNSKEY/g" ~/.bashrc.sh fi - else # CREATE echo "### ASTROPORT IDENTITY ###" >> ~/.bashrc @@ -33,6 +33,7 @@ else echo "G1PUB=$newG1PUB" >> ~/.bashrc echo "IPFSNODEID=$newIPFSNODEID" >> ~/.bashrc echo "IPNSKEY=_IPNSKEY_" >> ~/.bashrc + echo "XZUID=$XZUID" >> ~/.bashrc fi source ~/.bashrc diff --git a/ISOconfig.sh b/ISOconfig.sh index c10ee3b..856e983 100755 --- a/ISOconfig.sh +++ b/ISOconfig.sh @@ -147,7 +147,7 @@ ipfs swarm peers ######################################################################## echo 'EXTEND ~/.bashrc' ######################################################################## -~/.zen/astrXbian/.install/update_bashrc.sh +~/.zen/astrXbian/.install/update_bashrc.sh "$XZUID" echo "COPY .kodi template " cp -Rf ~/.zen/astrXbian/.install/.kodi ~/