forked from axiom-team/astrXbian
Add XZUID to ~/.bashrc
This commit is contained in:
parent
578d31c2cc
commit
c6c796485c
|
@ -6,7 +6,7 @@
|
||||||
########################################################################
|
########################################################################
|
||||||
# update_bashrc.sh
|
# update_bashrc.sh
|
||||||
# Add $YOU $IPFSNODEID $G1PUB to ~/.bashrc
|
# Add $YOU $IPFSNODEID $G1PUB to ~/.bashrc
|
||||||
|
XZUID="$1"
|
||||||
source ~/.bashrc
|
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"
|
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/YOU=$YOU/YOU=$newYOU/g" ~/.bashrc
|
||||||
sed -i "s/$G1PUB/$newG1PUB/g" ~/.bashrc
|
sed -i "s/$G1PUB/$newG1PUB/g" ~/.bashrc
|
||||||
sed -i "s/$IPFSNODEID/$newIPFSNODEID/g" ~/.bashrc
|
sed -i "s/$IPFSNODEID/$newIPFSNODEID/g" ~/.bashrc
|
||||||
|
|
||||||
if [[ $IPNSKEY == "_IPNSKEY_" ]]; then
|
if [[ $IPNSKEY == "_IPNSKEY_" ]]; then
|
||||||
ipfs key rm xbian
|
ipfs key rm xbian
|
||||||
IPNSKEY=$(ipfs key gen xbian)
|
IPNSKEY=$(ipfs key gen xbian)
|
||||||
sed -i "s/_IPNSKEY_/$IPNSKEY/g" ~/.bashrc.sh
|
sed -i "s/_IPNSKEY_/$IPNSKEY/g" ~/.bashrc.sh
|
||||||
fi
|
fi
|
||||||
|
|
||||||
else
|
else
|
||||||
# CREATE
|
# CREATE
|
||||||
echo "### ASTROPORT IDENTITY ###" >> ~/.bashrc
|
echo "### ASTROPORT IDENTITY ###" >> ~/.bashrc
|
||||||
|
@ -33,6 +33,7 @@ else
|
||||||
echo "G1PUB=$newG1PUB" >> ~/.bashrc
|
echo "G1PUB=$newG1PUB" >> ~/.bashrc
|
||||||
echo "IPFSNODEID=$newIPFSNODEID" >> ~/.bashrc
|
echo "IPFSNODEID=$newIPFSNODEID" >> ~/.bashrc
|
||||||
echo "IPNSKEY=_IPNSKEY_" >> ~/.bashrc
|
echo "IPNSKEY=_IPNSKEY_" >> ~/.bashrc
|
||||||
|
echo "XZUID=$XZUID" >> ~/.bashrc
|
||||||
fi
|
fi
|
||||||
source ~/.bashrc
|
source ~/.bashrc
|
||||||
|
|
||||||
|
|
|
@ -147,7 +147,7 @@ ipfs swarm peers
|
||||||
########################################################################
|
########################################################################
|
||||||
echo 'EXTEND ~/.bashrc'
|
echo 'EXTEND ~/.bashrc'
|
||||||
########################################################################
|
########################################################################
|
||||||
~/.zen/astrXbian/.install/update_bashrc.sh
|
~/.zen/astrXbian/.install/update_bashrc.sh "$XZUID"
|
||||||
|
|
||||||
echo "COPY .kodi template "
|
echo "COPY .kodi template "
|
||||||
cp -Rf ~/.zen/astrXbian/.install/.kodi ~/
|
cp -Rf ~/.zen/astrXbian/.install/.kodi ~/
|
||||||
|
|
Loading…
Reference in New Issue