Browse Source

reglages

master
qo-op 1 month ago
parent
commit
1b0b483b19
1 changed files with 10 additions and 5 deletions
  1. +10
    -5
      zen/wordpress_channel.sh

+ 10
- 5
zen/wordpress_channel.sh View File

@ -15,6 +15,9 @@ IPFSNODEID=$(ipfs id -f='<id>\n')
[[ -f ~/.zen/ipfs/.$IPFSNODEID/_xbian.zuid ]] && AXID=$(cat ~/.zen/ipfs/.$IPFSNODEID/_xbian.zuid);
[[ -f ~/.zen/ipfs/.$IPFSNODEID/G1SSB/_g1.gchange_title ]] && XZUID=$(cat ~/.zen/ipfs/.$IPFSNODEID/G1SSB/_g1.gchange_title)
echo "REFRESH IPNS SELF PUBLISH"
~/.zen/astrXbian/zen/ipns_self_publish.sh
## CREATION DE LA ZONE DE DIALOGUE IPFS SWARM
for wpcall in $(ls -d ~/.zen/ipfs_swarm/.12D*/astroport/wordpress/*);
do
@ -23,12 +26,14 @@ do
g1pubsource=$($MY_PATH/tools/ipfs_to_g1.py $ipfnodesource)
mediakey=$(echo "$wpcall" | cut -d '/' -f 9 )
[[ -f $wpcall/do ]] && istodo=$(cat $wpcall/do) && echo "istodo=$istodo"
## REFRESH SWARM cache
rm -Rf $wpcall/$mediakey
$MY_PATH/tools/timeout.sh -t 12 ipfs get --output=/home/$YOU/.zen/ipfs_swarm/ /ipns/$ipfnodesource
[[ $istodo && "$istodo" != "1" ]] && echo "REFRESH $istodo" && $MY_PATH/tools/timeout.sh -t 12 ipfs get --output=/home/$YOU/.zen/ipfs_swarm/ /ipns/$istodo
[[ "$ipfsnodeid" != "$IPFSNODEID" ]] && echo "REFRESH $ipfnodesource" && $MY_PATH/tools/timeout.sh -t 12 ipfs get --output=/home/$YOU/.zen/ipfs_swarm/ /ipns/$ipfnodesource
[[ -f $wpcall/do ]] && istodo=$(cat $wpcall/do)
[[ -f $wpcall/done ]] && isdone=$(cat $wpcall/done)
[[ -f $wpcall/done ]] && isdone=$(cat $wpcall/done) && echo "isdone=$isdone"
[[ ! $isdone && ! $istodo ]] && continue
if [[ "$ipfsnodeid" != "$IPFSNODEID" ]]; then
@ -61,8 +66,8 @@ do
fi
else
## I am the source of that "done" wpcall remove "do"
[[ $isdone ]] && echo rm -f ~/.zen/ipfs/.$ipfnodesource/astroport/wordpress/$mediakey/do
echo '## I am the source of that "done" wpcall remove "do"'
[[ $isdone ]] && echo "DONE! Removing my do" && rm -f ~/.zen/ipfs/.$ipfnodesource/astroport/wordpress/$mediakey/do
fi
done


Loading…
Cancel
Save