REMOVE SWARM EMPTY DIRECTORIES

This commit is contained in:
fred 2021-09-25 02:33:59 +02:00
parent 1cf80f7d52
commit cc25371f36
1 changed files with 9 additions and 5 deletions

View File

@ -114,16 +114,18 @@ do
continue continue
fi fi
fi fi
################################################################
echo "Removing 8 days older data from ~/.zen/ipfs_swarm/.$ipfsnodeid/"
find /home/$YOU/.zen/ipfs_swarm/.$ipfsnodeid/ -type f -mtime +8 -exec rm '{}' \;
find /home/$YOU/.zen/ipfs_swarm/.$ipfsnodeid/ -empty -type d -delete;
################################################################ ################################################################
## Refresh bootstrap if XID exists AND PING not null ## Refresh bootstrap if XID exists AND PING not null
if [[ "$XID" != "" && "$(cat ~/.zen/ipfs/.$IPFSNODEID/FRIENDS/$whoisg1/ping.average.txt 2>dev/null)" != "" ]]; then if [[ "$XID" != "" && "$(cat ~/.zen/ipfs/.$IPFSNODEID/FRIENDS/$whoisg1/ping.average.txt 2>dev/null)" != "" ]]; then
ipfs bootstrap rm "/ipfs/$ipfsnodeid" && ipfs bootstrap add "$peerline" || ipfs bootstrap rm "$peerline" ipfs bootstrap rm "/ipfs/$ipfsnodeid" && ipfs bootstrap add "$peerline" || ipfs bootstrap rm "$peerline"
################################################################ ################################################################
################################################################
echo "Removing 8 days older data from ~/.zen/ipfs_swarm/.$ipfsnodeid/"
find /home/$YOU/.zen/ipfs_swarm/.$ipfsnodeid/ -type f -mtime +8 -exec rm '{}' \;
find /home/$YOU/.zen/ipfs_swarm/.$ipfsnodeid/ -empty -type d -delete;
################################################################ ################################################################
echo "OK Friend SWARM REFRESH /ipns/$ipfsnodeid INTO ~/.zen/ipfs_swarm/" echo "OK Friend SWARM REFRESH /ipns/$ipfsnodeid INTO ~/.zen/ipfs_swarm/"
ipfs --timeout=360s get --output=/home/$YOU/.zen/ipfs_swarm/ /ipns/$ipfsnodeid ipfs --timeout=360s get --output=/home/$YOU/.zen/ipfs_swarm/ /ipns/$ipfsnodeid
@ -212,7 +214,9 @@ do
done done
########################################################################
## REMOVE SWARM EMPTY DIRECTORIES
find /home/$YOU/.zen/ipfs_swarm/ -empty -type d -delete
######################################################################## ########################################################################
## FIND LOCAL IPFS NODE - SERACH FOR FOAF stargate replications ## FIND LOCAL IPFS NODE - SERACH FOR FOAF stargate replications
######################################################################## ########################################################################