Browse Source

using cesium+/gchange+ instead of scuttlebutt

master
qo-op 1 month ago
parent
commit
48970b176b
4 changed files with 19 additions and 20 deletions
  1. +2
    -2
      ISOconfig.sh
  2. +6
    -5
      install.sh
  3. +1
    -0
      zen/gchange_INIT.sh
  4. +10
    -13
      zen/gchange_IPFS_swarm.sh

+ 2
- 2
ISOconfig.sh View File

@ -181,8 +181,8 @@ echo 'INSTALL Astroport cron_MINUTE'
# BETTER NOT: Send new 'ipfstryme' message on each boot is done instead
echo "CHANGE hostname"
sudo sed -i s/xbian/$XZUID/g /etc/hostname
sudo sed -i s/xbian/$XZUID/g /etc/hosts
sudo sed -i s/astrxbian/$XZUID/g /etc/hostname
sudo sed -i s/astrxbian/$XZUID/g /etc/hosts
echo "CHANGE DNS" # Avoid provider restrictions
sudo cat > /etc/resolv.conf <<EOF

+ 6
- 5
install.sh View File

@ -1,9 +1,9 @@
#!/bin/bash
{
# Check requierments
# Check requirements
sudo apt update
sudo apt install curl net-tools -y
sudo apt install git curl net-tools -y
gitpath="https://git.p2p.legal/axiom-team/astroport/raw/master"
@ -25,10 +25,11 @@ curl -s $gitpath/.install/ipfs_alone.sh | bash || exit 1
# Set environment variables
curl -s $gitpath/.install/sys_checkOS.sh noexec | bash || exit 1
# SSB install
echo -e "${c_green}2. Ḡ1/ScuttleButt anoptical layer$c_"
# SSB install (now using cesium+/gchange+)
# echo -e "${c_green}2. Ḡ1/ScuttleButt anoptical layer$c_"
# ONCE YOU READ and AGREE. Run TrustFull QUICK Install !!
curl -s $gitpath/zen/tools/make_G1SSB_secret.sh | bash || exit 1
# curl -s $gitpath/zen/tools/make_G1SSB_secret.sh | bash || exit 1
# LOVEland install
curl -s $gitpath/.install/loveland.sh | bash || exit 1

+ 1
- 0
zen/gchange_INIT.sh View File

@ -96,6 +96,7 @@ echo "$diskperf" > ~/.zen/ipfs/.${IPFSNODEID}/disk.perf
echo $(df ~/.ipfs/ | tail -n 1 | awk '{print $4}') > ~/.zen/ipfs/.${IPFSNODEID}/disk.bytes
## PUBLISH ~/.zen/ipfs on self key IPNS
IWALLETS=$(ipfs add -rHq ~/.zen/ipfs | tail -n 1)
NODEIPNS=$(ipfs name publish --allow-offline --quieter /ipfs/$IWALLETS)

+ 10
- 13
zen/gchange_IPFS_swarm.sh View File

@ -22,14 +22,6 @@ ME="${0##*/}"
## TODO : Beware of liking_me FLOOD & Invite $liking_me people to my #Swarm0
########################################################################
## CONNECT GLOBAL "ipfs.io" ## DANGEROUS DATA LEAK only for short time...
########################################################################
# ADD ipfs.io public bootstrap into your swarm peers
# RUN: cat ~/.zen/astroport/ipfs.swarm.ipfs.io | ipfs swarm connect
# SOON ipfs swarm peers will GROW!!! YOU ARE VSIBLE !!!
# RUN: sudo systemctl restart ipfs # GOES BACK TO SWARM0
########################################################################
########################################################################
# ENVIRONEMENT DETECTION + IPFS ~/.zen/ipfs/.$IPFSNODEID/G1SSB/_info
@ -43,6 +35,7 @@ isIPFSRunning=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|gr
# Force Strict #swarm0 !!?
# ipfs bootstrap rm --all
echo "" > ~/.zen/A_allow_ip.txt
echo "" > ~/.zen/A_liking_me_NO_ipfstryme.txt # contains "friends" with no "ipfstryme" incoming message
liking_me_count=0
friend_of_mine_count=0
@ -65,7 +58,7 @@ do
echo $ip >> ~/.zen/A_allow_ip.txt
# Get its ipfsnodeid
ipfsnodeid=$(echo "$peer" | awk -F '/' '{print $7}')
# 3. ADD liking_me friend_of_mine to my swarm & bootstrap
ipfs swarm connect $peer;
ipfs bootstrap add $peer;
@ -73,15 +66,19 @@ do
ipfsadd=$((ipfsadd+1))
done;
#g1id=$(~/.zen/astroport/zen/tools/ipfs_to_g1.py "$ipfsnodeid")
#echo "G1 ID : $g1id"
if [[ $friend_of_mine != null ]]; then
if [[ $ipfsadd == 0 ]]; then
# Friend of mine with no ipfstryme message (did not install astroport)
echo "No 'ipfstryme' message... from $liking_me"
echo "$liking_me" >> ~/.zen/A_liking_me_NO_ipfstryme.txt
else
else
# REMOVING DUPLICATES OLD ipfstryme MESSAGES
nbmessage=0
for messageid in $(./jaklis.py read -n50 -j | jq -r --arg friendKEY "$liking_me" '.[] | select(.pubkey == $friendKEY)' | jq -r '.id')
for messageid in $(./jaklis.py read -n50 -j | jq -r --arg friendKEY "$liking_me" '.[] | select(.pubkey == $friendKEY)' | jq 'select(.title == "ipfstryme")' | jq -r '.id')
do
nbmessage=$((nbmessage+1))
[ $nbmessage -gt 1 ] && echo "Delete OLD 'ipfstryme' messages from $liking_me" && ./jaklis.py delete -i $messageid
@ -106,9 +103,9 @@ My actual #SWARM0"
ipfs swarm peers
echo "__________________________________________"
echo
## Send message to
## Could send message to friends with 'ipfstryme' message
for line in $(cat ~/.zen/A_liking_me_NO_ipfstryme.txt | uniq); do
echo "Liking ME, but no ipfstryme received..."
echo "Liking each other, but no ipfstryme received..."
echo "cd ~/.zen/astroport/zen/jaklis"
echo "./jaklis.py send -d $line -t 'Astroport' -m 'Rejoins mon #Swarm0 https://copylaradio.com'"
done

Loading…
Cancel
Save