Browse Source

ipfs_swarm/.12D*

pull/32/head
qo-op 9 months ago
parent
commit
32d78428f6
  1. 4
      README.md
  2. 4
      zen/ipfs_SWARM_refresh.sh
  3. 2
      zen/new_file_in_astroport.sh
  4. 2
      zen/refresh_ASTRXBIAN_index.sh
  5. 11
      zen/ssh_forward2onelove.sh
  6. 2
      zen/tools/autoPINfriends.sh

4
README.md

@ -164,7 +164,7 @@ L'essaim se restructure avec ```cron_MINUTE.sh``` pour se synchroniser et diffus
~/.zen/astrXbian/zen/ssh_forward2onelove.sh
# Obtenir la liste de tous ses amis (gchange+)
cat ~/.zen/ipfs_swarm/.*/G1SSB/_g1.gchange_title
cat ~/.zen/ipfs_swarm/.12D*/G1SSB/_g1.gchange_title
# Noms des stations astroport de son swarm
for peer in $(ipfs swarm peers); do ipfsnodeid=${peer##*/}; ipfs cat /ipns/$ipfsnodeid/.$ipfsnodeid/G1SSB/_g1.gchange_title; done
@ -176,7 +176,7 @@ for ID in $( ls ~/.zen/ipfs/.${IPFSNODEID}/PIN/ | cut -d '/' -f 8); do ipfs ls $
cat ~/.zen/ipfs/.${IPFSNODEID}/astroport/kodi/vstream/*ASTRXBIAN
# Lister les fichiers partagés par votre essaim d'amis
cat ~/.zen/ipfs_swarm/.*/astroport/kodi/vstream/*ASTRXBIAN | sort | uniq
cat ~/.zen/ipfs_swarm/.12D*/astroport/kodi/vstream/*ASTRXBIAN | sort | uniq
# CODE ASTROPORT beta
ipfs ls /ipns/k51qzi5uqu5dgfc3m379rf9820vg20hjhnmo9letrkj2p177tq013ohn68xf2y

4
zen/ipfs_SWARM_refresh.sh

@ -98,13 +98,13 @@ mkdir -p ~/.zen/ipfs/.${IPFSNODEID}/astroport/kodi/vstream/
for PREFIX in F S A Y
do
echo "CAT;TMDB;YEAR;TITLE;SAISON;GENRES;GROUPES;RES;URLS=http://127.0.0.1:8181" > ~/.zen/ipfs/.${IPFSNODEID}/${PREFIX}ASTRXBIAN
cat ~/.zen/ipfs_swarm/.*/astroport/kodi/vstream/${PREFIX}ASTRXBIAN | grep -Ev "CAT;TMDB" | sort | uniq >> ~/.zen/ipfs/.${IPFSNODEID}/${PREFIX}ASTRXBIAN
cat ~/.zen/ipfs_swarm/.12D*/astroport/kodi/vstream/${PREFIX}ASTRXBIAN | grep -Ev "CAT;TMDB" | sort | uniq >> ~/.zen/ipfs/.${IPFSNODEID}/${PREFIX}ASTRXBIAN
done
########################################################################
# REFRESH tiddlywiki index # TODO create local index from swarm wiki
########################################################################
for wiki in $(ls ~/.zen/ipfs_swarm/.*/index.html 2>/dev/null); do echo $wiki; done
for wiki in $(ls ~/.zen/ipfs_swarm/.12D*/index.html 2>/dev/null); do echo $wiki; done
########################################################################
########################################################################

2
zen/new_file_in_astroport.sh

@ -211,7 +211,7 @@ echo "$line"
echo "$line" >> ~/.zen/ipfs/.${IPFSNODEID}/astroport/kodi/vstream/${PREFIX}ASTRXBIAN
echo "----------------- REFRESH GLOBAL KODI INDEX ----------------------"
cat ~/.zen/ipfs/.${IPFSNODEID}/astroport/kodi/vstream/${PREFIX}ASTRXBIAN ~/.zen/ipfs_swarm/.*/astroport/kodi/vstream/${PREFIX}ASTRXBIAN | sort | uniq > ~/.zen/ipfs/.${IPFSNODEID}/${PREFIX}ASTRXBIAN
cat ~/.zen/ipfs/.${IPFSNODEID}/astroport/kodi/vstream/${PREFIX}ASTRXBIAN ~/.zen/ipfs_swarm/.12D*/astroport/kodi/vstream/${PREFIX}ASTRXBIAN | sort | uniq > ~/.zen/ipfs/.${IPFSNODEID}/${PREFIX}ASTRXBIAN
########################################################################
# REFRESH IPNS SELF PUBLISH

2
zen/refresh_ASTRXBIAN_index.sh

@ -14,7 +14,7 @@ export IPFSNODEID=$(ipfs id -f='<id>\n')
# REFRESH INDEX Films Animes Series ...
for PREFIX in F A S
do
cat ~/.zen/ipfs_swarm/.*/astroport/kodi/vstream/${PREFIX}ASTRXBIAN | sort | uniq > ~/.zen/ipfs/.${IPFSNODEID}/${PREFIX}ASTRXBIAN
cat ~/.zen/ipfs_swarm/.12D*/astroport/kodi/vstream/${PREFIX}ASTRXBIAN | sort | uniq > ~/.zen/ipfs/.${IPFSNODEID}/${PREFIX}ASTRXBIAN
echo "${PREFIX} INDEX UPDATED : http://127.0.0.1:8181/ipns/${IPFSNODEID}/.${IPFSNODEID}/${PREFIX}ASTRXBIAN"
done

11
zen/ssh_forward2onelove.sh

@ -15,27 +15,28 @@ G1PUB=$(cat ~/.zen/secret.dunikey | grep 'pub:' | cut -d ' ' -f 2) || er+=" G1PU
########################################################################
## ACTIVATE / DESACTIVATE SSH FORWARD to fred@ONELOVE
########################################################################
ARG="$1"
if [[ ! $(cat ~/.ssh/authorized_keys | grep "fred@ONELOVE") ]]
then
# ADD fred@ONELOVE to ~/.ssh/authorized_keys
echo "ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDFLHW8P88C/B7622yXzdAn1ZcTBfE1A4wMqajBwAoHwUVTOUaYfvkiSxbzb5H9dPTAXhQU6ZfuLa70kTo1m2b9TKH0tD6hR3RiKJ0NIjCHYEypcPGpLmHaZWnBKPq3IUU24qFVdUJxnTkDdFUszYMNoV4nqlXY/ZYdNpic8L1jPPyfOLLfPFkuSxagyQj4FGJq77UQE5j+skMJS3ISkazNTLqOCGLFJ5qtBC11BvQaCJ4cQ2Ss7ejPYhpx16NLJfg9VtG4dv9ZebEIl2pf7niiQGSPrDMFWHuQcGAuHt/patr0BcvfvD3Gv+qNsVfAJCNZ2U5NHEMKIhgj1ilNPEw7 fred@ONELOVE" >> ~/.ssh/authorized_keys
else
echo "fred@ONELOVE already in ~/.ssh/authorized_keys"
fi
## NOT forwarding for myself
if [[ "$G1PUB" != "Ee1n3hDv9vunfd6m3LW6XeYg7bnt5aaRn9EjqnBe8GNS" ]]
then
if [[ $(ipfs p2p ls | grep $G1PUB-ssh) ]]
then
ipfs p2p close -p /x/$G1PUB-ssh
## SEND MESSAGE
echo "ipfs p2p close -p /x/$G1PUB-ssh" > /tmp/ssh.forward
~/.zen/astrXbian/zen/jaklis/jaklis.py send -d Ee1n3hDv9vunfd6m3LW6XeYg7bnt5aaRn9EjqnBe8GNS -t "SSH-STOP" -f /tmp/ssh.forward
echo "STOP"
else
ipfs p2p listen /x/$G1PUB-ssh /ip4/127.0.0.1/tcp/22
## SEND jaklis message to onelove for remote access
## SEND MESSAGE
PORT="109${RANDOM:0:2}" # RANDOM PORT
echo "ipfs p2p forward /x/$G1PUB-ssh /ip4/127.0.0.1/tcp/$PORT /p2p/$IPFSNODEID
ssh $USER@localhost -p $PORT" > /tmp/ssh.forward

2
zen/tools/autoPINfriends.sh

@ -15,7 +15,7 @@ ls ~/.zen/ipfs/.${IPFSNODEID}/PIN/*/* | cut -d '/' -f 8
## AUTO PIN FRIENDS ACTIVATION
# /home/fred/.zen/ipfs_swarm/.12D3KooWB2PWQegymKFGdhKGQbyvnp5RQvjFPzz6KC6sxeo3juaB/PIN/QmbkFKpmfaZyFTBNGbnsLDuaQULzLTAS5DBYHjSYVDrFen/2D2LfX7GaQynDooqn1Eb21zavbgcNJucMbjrafe9qxrF
for astrofile in $(ls ~/.zen/ipfs_swarm/.*/PIN/*/* | grep -Ev ${IPFSNODEID} | cut -d '/' -f 8 | sort | uniq );
for astrofile in $(ls ~/.zen/ipfs_swarm/.12D*/PIN/*/* | grep -Ev ${IPFSNODEID} | cut -d '/' -f 8 | sort | uniq );
do
# /home/fred/.zen/ipfs_swarm/.12D3KooWB2PWQegymKFGdhKGQbyvnp5RQvjFPzz6KC6sxeo3juaB/PIN/QmbkFKpmfaZyFTBNGbnsLDuaQULzLTAS5DBYHjSYVDrFen/2D2LfX7GaQynDooqn1Eb21zavbgcNJucMbjrafe9qxrF
# PINNING NEW FILE

Loading…
Cancel
Save