wep
This commit is contained in:
parent
30ee0565e8
commit
066804f31f
|
@ -106,7 +106,7 @@ NB: Les films placés dans ~/astroport/film/$TMDBID/ sont automatiquement transf
|
||||||
|
|
||||||
-- Automate Astroport/KODI en demonstration pour Xbian.org --
|
-- Automate Astroport/KODI en demonstration pour Xbian.org --
|
||||||
|
|
||||||
## PRINCIPE DE FONCTIONNEMENT
|
## PRINCIPE DE FONCTIONNEMENT ([index des PAD astroport](https://pad.p2p.legal/s/astroport-index))
|
||||||
|
|
||||||
> Astroport/KODI vous permet de partager les vidéos que vous aimez avec les gens que vous aimez.
|
> Astroport/KODI vous permet de partager les vidéos que vous aimez avec les gens que vous aimez.
|
||||||
|
|
||||||
|
|
|
@ -32,3 +32,15 @@
|
||||||
## LINKING ME PEOPLE
|
## LINKING ME PEOPLE
|
||||||
~/.zen/astrXbian/zen/jaklis/jaklis.py -k ~/.zen/secret.dunikey -n "https://data.gchange.fr" stars | jq -r '.likes[].issuer'
|
~/.zen/astrXbian/zen/jaklis/jaklis.py -k ~/.zen/secret.dunikey -n "https://data.gchange.fr" stars | jq -r '.likes[].issuer'
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
# EXEMPLES DE COMMANDES BALISES
|
||||||
|
```
|
||||||
|
|
||||||
|
## CHECK SWARM STATIONS TIMESTAMPS
|
||||||
|
for g1id in $(ls ~/.zen/ipfs/.$IPFSNODEID/FRIENDS); do echo $g1id; [[ "$g1id" == "index.html" ]] && continue; ipfsnodeid=$(~/.zen/astrXbian/zen/tools/g1_to_ipfs.py $g1id); ts=$(ipfs --timeout=10s cat /ipns/$ipfsnodeid/.$ipfsnodeid/.timestamp); echo $(date -ud @$ts); done
|
||||||
|
for ts in $(cat ~/.zen/ipfs_swarm/.*/.timestamp); do echo $(date -ud @$ts); done
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
```
|
||||||
|
|
|
@ -12,6 +12,33 @@ if [ "$EUID" -eq 0 ]
|
||||||
else echo -e "OK $USER, let's go!";
|
else echo -e "OK $USER, let's go!";
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "Hello,
|
||||||
|
|
||||||
|
This script (you could read and modify as it is open source software) is about to transform your computer into an astroport station.
|
||||||
|
|
||||||
|
This process involve different upgrades to be made on your system.
|
||||||
|
1. install IPFS, the interplanetary file system (https://ipfs.io)
|
||||||
|
2. install python cryptographic libraries to run natools, your key wizard companion
|
||||||
|
3. download 'astroport' code release you have choosen.
|
||||||
|
|
||||||
|
~/.zen directory and datastructure will emerge
|
||||||
|
~/.zen/ipfs & ~/.zen/ipfs_swarm contains all meshed media index from you and your friends.
|
||||||
|
|
||||||
|
ASTROPORT is activated by cron every minute it maintains the connection with your friends.
|
||||||
|
It is the vessel that gives you avvess to your p2p AVATAR.
|
||||||
|
You carry and share your data around your friends through a confidence network
|
||||||
|
established through 1 to 5 'hearts' exchanged, opening 5 stargates where any can push/pull data.
|
||||||
|
|
||||||
|
TODO
|
||||||
|
Just indicate which is the directory assigned to each star.
|
||||||
|
Then any of your friends from such star level can replicate (modify) those data with you.
|
||||||
|
|
||||||
|
Your station is publishing its index every time it changes and every 6 hours for all MEDIAKEY from PIN station.
|
||||||
|
Following that principle add new directory into ~/.zen/ipfs and index any dataset, it will be published on your IPFS semaphore.
|
||||||
|
|
||||||
|
Now you need to enter your password to obtain sudo access.
|
||||||
|
Please.
|
||||||
|
"
|
||||||
# Ask user password on start
|
# Ask user password on start
|
||||||
sudo true
|
sudo true
|
||||||
|
|
||||||
|
@ -32,9 +59,9 @@ fi
|
||||||
|
|
||||||
[[ -d ~/.ipfs ]] && echo "IPFS install exist! Please remove or backup before executing this script EXIT" && exit 1
|
[[ -d ~/.ipfs ]] && echo "IPFS install exist! Please remove or backup before executing this script EXIT" && exit 1
|
||||||
|
|
||||||
echo -e "IPFS + Astroport Light installation..."
|
echo -e "Check and install python curl, git and tools."
|
||||||
|
|
||||||
[[ $(which pip3) ]] && sudo pip3 install duniterpy || (echo "python3 pip3 is missing on your device. EXIT" && exit 1)
|
[[ $(which pip3) ]] && python3 -m pip install -U pip && python3 -m pip install -U wheel cryptography Ed25519 base58 google protobuf duniterpy==0.62.0 termcolor python-dotenv gql==3.0.0a5 requests pybase64 || (echo "python3 pip3 is missing on your device. EXIT" && exit 1)
|
||||||
[[ ! $(which curl) ]] && sudo apt-get install curl -y
|
[[ ! $(which curl) ]] && sudo apt-get install curl -y
|
||||||
[[ ! $(which git) ]] && sudo apt-get install git -y
|
[[ ! $(which git) ]] && sudo apt-get install git -y
|
||||||
|
|
||||||
|
@ -42,10 +69,13 @@ echo -e "IPFS + Astroport Light installation..."
|
||||||
|
|
||||||
# CHECK node IP isLAN?
|
# CHECK node IP isLAN?
|
||||||
myIP=$(hostname -I | awk '{print $1}')
|
myIP=$(hostname -I | awk '{print $1}')
|
||||||
|
echo "Your IP is $myIP"
|
||||||
isLAN=$(echo $myIP | grep -E "/(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^::1$)|(^[fF][cCdD])/")
|
isLAN=$(echo $myIP | grep -E "/(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(^172\.2[0-9]\.)|(^172\.3[0-1]\.)|(^::1$)|(^[fF][cCdD])/")
|
||||||
|
[[ $isLAN ]] && echo "You are located in a LAN" || echo "You have a public IP address"
|
||||||
MACHINE_TYPE=`uname -m`
|
MACHINE_TYPE=`uname -m`
|
||||||
|
echo "You are running $MACHINE_TYPE CPU"
|
||||||
|
|
||||||
|
echo "Downloading ipfs binaries"
|
||||||
if [ ${MACHINE_TYPE} == 'x86_64' ]; then
|
if [ ${MACHINE_TYPE} == 'x86_64' ]; then
|
||||||
curl -s https://dist.ipfs.io/ipfs-update/v1.6.0/ipfs-update_v1.6.0_linux-amd64.tar.gz -o $MY_PATH/ipfs-update.tar.gz
|
curl -s https://dist.ipfs.io/ipfs-update/v1.6.0/ipfs-update_v1.6.0_linux-amd64.tar.gz -o $MY_PATH/ipfs-update.tar.gz
|
||||||
elif [ ${MACHINE_TYPE:0:3} == 'arm' ]; then
|
elif [ ${MACHINE_TYPE:0:3} == 'arm' ]; then
|
||||||
|
@ -69,6 +99,7 @@ if [ -f $MY_PATH/ipfs-update.tar.gz ]; then
|
||||||
|
|
||||||
else
|
else
|
||||||
## TERRAPI4 aarch64 install ipfs_aarch64_v0.9.1
|
## TERRAPI4 aarch64 install ipfs_aarch64_v0.9.1
|
||||||
|
echo "INSTALL ipfs 0.9.1 >>>>>>>>>>>>>>>>>>>>>>>>>> arm64"
|
||||||
sudo tar -xvzf /tmp/ipfs_aarch64_v0.9.1.tar.gz -C /usr/src/ || err "Untar ipfs_aarch64"
|
sudo tar -xvzf /tmp/ipfs_aarch64_v0.9.1.tar.gz -C /usr/src/ || err "Untar ipfs_aarch64"
|
||||||
rm /tmp/ipfs_aarch64_v0.9.1.tar.gz
|
rm /tmp/ipfs_aarch64_v0.9.1.tar.gz
|
||||||
cd /usr/src/go-ipfs/
|
cd /usr/src/go-ipfs/
|
||||||
|
@ -83,7 +114,7 @@ fi
|
||||||
|
|
||||||
## Special Xbian init.d config
|
## Special Xbian init.d config
|
||||||
## DEBIAN SYSTEMCTL
|
## DEBIAN SYSTEMCTL
|
||||||
echo "CREATE SYSTEMD ipfs SERVICE >>>>>>>>>>>>>>>>>>"
|
echo "SYSTEMD ipfs SERVICE >>>>>>>>>>>>>>>> ON"
|
||||||
cat > /tmp/ipfs.service <<EOF
|
cat > /tmp/ipfs.service <<EOF
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=IPFS daemon
|
Description=IPFS daemon
|
||||||
|
@ -111,7 +142,7 @@ EOF
|
||||||
|
|
||||||
|
|
||||||
###########################################
|
###########################################
|
||||||
# ACTIVATE IPFS OPTIONS: #swarm0 INIT
|
echo "# ACTIVATE IPFS OPTIONS: #swarm0 INIT"
|
||||||
###########################################
|
###########################################
|
||||||
### IMPORTANT !!!!!!! IMPORTANT !!!!!!
|
### IMPORTANT !!!!!!! IMPORTANT !!!!!!
|
||||||
###########################################
|
###########################################
|
||||||
|
@ -124,8 +155,8 @@ ipfs config Datastore.StorageMax $diskSize
|
||||||
## Activate Rapid "ipfs p2p"
|
## Activate Rapid "ipfs p2p"
|
||||||
ipfs config --json Experimental.Libp2pStreamMounting true
|
ipfs config --json Experimental.Libp2pStreamMounting true
|
||||||
ipfs config --json Experimental.P2pHttpProxy true
|
ipfs config --json Experimental.P2pHttpProxy true
|
||||||
ipfs config --json Swarm.ConnMgr.LowWater 0
|
ipfs config --json Swarm.ConnMgr.LowWater 50
|
||||||
ipfs config --json Swarm.ConnMgr.HighWater 0
|
ipfs config --json Swarm.ConnMgr.HighWater 100
|
||||||
|
|
||||||
## Install gateway on 8181 port
|
## Install gateway on 8181 port
|
||||||
ipfs config Addresses.Gateway "/ip4/127.0.0.1/tcp/8181"
|
ipfs config Addresses.Gateway "/ip4/127.0.0.1/tcp/8181"
|
||||||
|
@ -147,6 +178,7 @@ mkdir -p ~/.zen/ipfs/.${IPFSNODEID}/G1SSB
|
||||||
XZUID="$(hostname)-$RANDOM$RANDOM"
|
XZUID="$(hostname)-$RANDOM$RANDOM"
|
||||||
echo "SETTING _xbian.zuid PROFILE NAME = $XZUID"
|
echo "SETTING _xbian.zuid PROFILE NAME = $XZUID"
|
||||||
echo "$XZUID" > ~/.zen/ipfs/.${IPFSNODEID}/_xbian.zuid
|
echo "$XZUID" > ~/.zen/ipfs/.${IPFSNODEID}/_xbian.zuid
|
||||||
|
echo 'balise /ipns/$IPFSNODEID/.$IPFSNODEID/_xbian.zuid'
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
########################################################################
|
########################################################################
|
||||||
|
@ -165,6 +197,7 @@ done
|
||||||
|
|
||||||
codesign=$(curl -s https://tube.copylaradio.com/ipns/$OASIS/.$OASIS/.mycode)
|
codesign=$(curl -s https://tube.copylaradio.com/ipns/$OASIS/.$OASIS/.mycode)
|
||||||
|
|
||||||
|
## ADD NETWORK EXPLORATION FROM LIKES
|
||||||
########################################################################
|
########################################################################
|
||||||
echo "RESTARTING ipfs"
|
echo "RESTARTING ipfs"
|
||||||
########################################################################
|
########################################################################
|
||||||
|
@ -175,7 +208,7 @@ sleep 10
|
||||||
echo ".... ACTUAL SWARM PEERS ..."
|
echo ".... ACTUAL SWARM PEERS ..."
|
||||||
ipfs swarm peers
|
ipfs swarm peers
|
||||||
|
|
||||||
echo "IPFS OK
|
echo "IPFS DONE
|
||||||
====================
|
====================
|
||||||
Station Astroport INSTALL
|
Station Astroport INSTALL
|
||||||
Activation ~/.zen/astrXbian/zen/cron_VRFY.sh
|
Activation ~/.zen/astrXbian/zen/cron_VRFY.sh
|
||||||
|
@ -209,12 +242,11 @@ echo "## INSTALL TiddlyWiki /ipns/${IPFSNODEID}/.${IPFSNODEID}/index.html"
|
||||||
[[ ! -f ~/.zen/ipfs/.${IPFSNODEID}/index.html ]] && mkdir -p ~/.zen/ipfs/.${IPFSNODEID} && cp ~/.zen/astrXbian/.install/templates/tiddlywiki/index.html ~/.zen/ipfs/.${IPFSNODEID}/index.html
|
[[ ! -f ~/.zen/ipfs/.${IPFSNODEID}/index.html ]] && mkdir -p ~/.zen/ipfs/.${IPFSNODEID} && cp ~/.zen/astrXbian/.install/templates/tiddlywiki/index.html ~/.zen/ipfs/.${IPFSNODEID}/index.html
|
||||||
|
|
||||||
|
|
||||||
echo "Tout semble OK?!
|
echo "Congratulation ! You are part of the astroport interplanetary fleet.
|
||||||
|
|
||||||
NE PAS OUBLIER!!
|
New. Activate your station offline storage.
|
||||||
Ajoutez le compagnon IFPS à votre navigateur.
|
Install ipfs companion : https://docs.ipfs.io/install/ipfs-companion/
|
||||||
Documentation : https://docs.ipfs.io/install/ipfs-companion/
|
FR : https://translate.google.com/translate?sl=auto&tl=fr&u=https://docs.ipfs.io/install/ipfs-companion/
|
||||||
Traduction FR : https://translate.google.com/translate?sl=auto&tl=fr&u=https://docs.ipfs.io/install/ipfs-companion/
|
|
||||||
"
|
"
|
||||||
|
|
||||||
## OPEN https://translate.google.com/translate?sl=auto&tl=fr&u=https://docs.ipfs.io/install/ipfs-companion/
|
## OPEN https://translate.google.com/translate?sl=auto&tl=fr&u=https://docs.ipfs.io/install/ipfs-companion/
|
||||||
|
|
Loading…
Reference in New Issue