bootstrap file PIN

This commit is contained in:
qo-op 2021-02-20 17:37:58 +01:00
parent 076df4e89e
commit 2faccc8a2a
1 changed files with 4 additions and 4 deletions

View File

@ -112,13 +112,13 @@ do
fi
## AUTO PIN FRIENDS ACTIVATION
# /home/fred/.zen/ipfs_swarm/.12D3KooWB2PWQegymKFGdhKGQbyvnp5RQvjFPzz6KC6sxeo3juaB/PIN/QmbkFKpmfaZyFTBNGbnsLDuaQULzLTAS5DBYHjSYVDrFen/2D2LfX7GaQynDooqn1Eb21zavbgcNJucMbjrafe9qxrF
for astrofile in $(ls ~/.zen/ipfs_swarm/.*/PIN/*/* |sort | uniq);
for astrofile in $(ls ~/.zen/ipfs_swarm/.*/PIN/*/* | cut -d '/' -f 8 | sort | uniq );
do
# /home/fred/.zen/ipfs_swarm/.12D3KooWB2PWQegymKFGdhKGQbyvnp5RQvjFPzz6KC6sxeo3juaB/PIN/QmbkFKpmfaZyFTBNGbnsLDuaQULzLTAS5DBYHjSYVDrFen/2D2LfX7GaQynDooqn1Eb21zavbgcNJucMbjrafe9qxrF
astroipfs=$(echo $astrofile | cut -d '/' -f 8 )
astroipfs=$astrofile
# PINNING NEW FILE
echo ~/.zen/ipfs/.${IPFSNODEID}/PIN/${astroipfs}
if [[ ! -d ~/.zen/ipfs/.${IPFSNODEID}/PIN/${astroipfs} ]]
echo "~/.zen/ipfs/.${IPFSNODEID}/PIN/${astroipfs}"
if [[ ! -d ~/.zen/ipfs/.${IPFSNODEID}/PIN/${astroipfs} ]];
then
echo "PIN : $astroipfs"
ipfs pin add /ipfs/$astroipfs && mkdir -p ~/.zen/ipfs/.${IPFSNODEID}/PIN/${astroipfs}/