Add XZUID to ~/.bashrc

This commit is contained in:
qo-op 2021-01-28 23:55:04 +01:00
parent 578d31c2cc
commit c6c796485c
2 changed files with 4 additions and 3 deletions

View File

@ -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

View File

@ -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 ~/