forked from axiom-team/astrXbian
cleaning old files and dir from ipfs_swarm
This commit is contained in:
parent
d926f2818a
commit
77b477ec6b
|
@ -45,8 +45,10 @@ touch /tmp/treated.ipfs.swarm
|
||||||
########################################################################
|
########################################################################
|
||||||
########################################################################
|
########################################################################
|
||||||
echo "******************************************************************"
|
echo "******************************************************************"
|
||||||
echo "RETRIEVING MY OWN DATA FROM IPNS TO ~/.zen/ipfs_swarm"
|
echo "REFRESHING MY OWN DATA FROM IPNS TO ~/.zen/ipfs_swarm"
|
||||||
#ipfs get --output=/home/$YOU/.zen/ipfs_swarm/ /ipns/$IPFSNODEID
|
find /home/$YOU/.zen/ipfs_swarm/.$IPFSNODEID/ -type f -mtime +30 -exec rm '{}' \;
|
||||||
|
find /home/$YOU/.zen/ipfs_swarm/.$IPFSNODEID/ -type d -mtime +30 -exec rmdir '{}' \;
|
||||||
|
ipfs get --output=/home/$YOU/.zen/ipfs_swarm/ /ipns/$IPFSNODEID
|
||||||
########################################################################
|
########################################################################
|
||||||
count=1
|
count=1
|
||||||
ipfs bootstrap > /tmp/ipfs_swarm_peers
|
ipfs bootstrap > /tmp/ipfs_swarm_peers
|
||||||
|
@ -104,8 +106,11 @@ do
|
||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
## Add to bootstrap if XID exists
|
## Refresh bootstrap if XID exists
|
||||||
[[ "$XID" != "" ]] && ipfs bootstrap add "$peerline" || ipfs bootstrap rm "$peerline"
|
[[ "$XID" != "" ]] && ipfs bootstrap rm "/ipfs/$ipfsnodeid" && ipfs bootstrap add "$peerline" || ipfs bootstrap rm "$peerline"
|
||||||
|
echo "Removing 30 days older data from ~/.zen/ipfs_swarm/.$ipfsnodeid/"
|
||||||
|
find /home/$YOU/.zen/ipfs_swarm/.$ipfsnodeid/ -type f -mtime +30 -exec rm '{}' \;
|
||||||
|
find /home/$YOU/.zen/ipfs_swarm/.$ipfsnodeid/ -type d -mtime +30 -exec rmdir '{}' \;
|
||||||
echo "OK Friend REFRESH /ipns/$ipfsnodeid INTO ~/.zen/ipfs_swarm/"
|
echo "OK Friend REFRESH /ipns/$ipfsnodeid INTO ~/.zen/ipfs_swarm/"
|
||||||
ipfs --timeout=60s get --output=/home/$YOU/.zen/ipfs_swarm/ /ipns/$ipfsnodeid
|
ipfs --timeout=60s get --output=/home/$YOU/.zen/ipfs_swarm/ /ipns/$ipfsnodeid
|
||||||
if [ $? != 0 ];
|
if [ $? != 0 ];
|
||||||
|
@ -235,7 +240,7 @@ done
|
||||||
# rm ~/.kodi/userdata/addon_data/plugin.video.vstream/astroport_cache.db
|
# rm ~/.kodi/userdata/addon_data/plugin.video.vstream/astroport_cache.db
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
# REFRESH tiddlywiki WALL OF FRIENDS
|
# REFRESH tiddlywiki WALL OF FRIENDS /ipns/${IPFSNODEID}/.${IPFSNODEID}/FRIENDS/index.html
|
||||||
########################################################################
|
########################################################################
|
||||||
zuid="$(cat ~/.zen/ipfs/.$IPFSNODEID/_xbian.zuid)"
|
zuid="$(cat ~/.zen/ipfs/.$IPFSNODEID/_xbian.zuid)"
|
||||||
|
|
||||||
|
@ -259,7 +264,7 @@ for wiki in $(ls ~/.zen/ipfs_swarm/.12D*/index.html | grep -Ev "${IPFSNODEID}" 2
|
||||||
ipfsnodeid=$(echo $wiki | cut -d '.' -f 3- | cut -d '/' -f 1)
|
ipfsnodeid=$(echo $wiki | cut -d '.' -f 3- | cut -d '/' -f 1)
|
||||||
whoisg1=$(~/.zen/astrXbian/zen/tools/ipfs_to_g1.py $ipfsnodeid)
|
whoisg1=$(~/.zen/astrXbian/zen/tools/ipfs_to_g1.py $ipfsnodeid)
|
||||||
echo "<li>
|
echo "<li>
|
||||||
<a href=\"https://www.gchange.fr/#/app/user?q=$whoisg1\">
|
<a target=\"gchange\" href=\"https://www.gchange.fr/#/app/user/$whoisg1/\">
|
||||||
<img src=\"https://tube.copylaradio.com/ipns/$ipfsnodeid/.$ipfsnodeid/QR.png\" alt=\"$whoisg1\" />
|
<img src=\"https://tube.copylaradio.com/ipns/$ipfsnodeid/.$ipfsnodeid/QR.png\" alt=\"$whoisg1\" />
|
||||||
</a>
|
</a>
|
||||||
<p class='video-title'>
|
<p class='video-title'>
|
||||||
|
|
Loading…
Reference in New Issue