From 0e1c331f727f67684b31eb1dcf503c138ef4db26 Mon Sep 17 00:00:00 2001 From: fred Date: Mon, 20 Sep 2021 20:49:35 +0200 Subject: [PATCH] KEY refresh index.html --- zen/ipns_TAG_refresh.sh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/zen/ipns_TAG_refresh.sh b/zen/ipns_TAG_refresh.sh index b9b83b0..c45ff2d 100755 --- a/zen/ipns_TAG_refresh.sh +++ b/zen/ipns_TAG_refresh.sh @@ -1,4 +1,4 @@ -#!/bin/bash +#!/bin/bash -x ######################################################################## # Author: Fred (support@qo-op.com) # Version: 2020.04.28 @@ -58,6 +58,7 @@ do # [[ ! $(echo "${mediakey}" | grep "TMDB_") ]] && continue ## REFRESH ONLY TMDB (level 1), youtube is level 0 IPNSLINK=$(ipfs key list -l | grep ${mediakey} | cut -d ' ' -f 1) [[ "${IPNSLINK}" == "" ]] && continue ## prevent empty IPNSLINK + echo "We are refreshing http://127.0.0.1:8181/ipns/${IPNSLINK}" count=$((count+1)) && echo "$count) " FILE_NAME=$(cat ~/.zen/ipfs/.${IPFSNODEID}/KEY/${mediakey}/${G1PUB}/.ipfs.filename) TITLE=$(cat ~/.zen/ipfs/.${IPFSNODEID}/KEY/${mediakey}/${G1PUB}/.title) @@ -101,7 +102,12 @@ do ### IPNS LINK CAN EVOLVE (REFRESH EVERY 12 H TO MAINTAIN ALIVE IN THE SWARM) ### This index.html is ipns link root, 1st welcome page for MEDIAKEY -> *** Redirect to CONTRACTS or LOGIN processing HERE *** - echo "=======> Mediakey Welcome index.html " + echo "=======> Mediakey Welcome index.html + IPNSLINK=$IPNSLINK + IPFSNODEID=$IPFSNODEID + XZUID=$XZUID + G1PUB=$G1PUB + TITLE=$TITLE" cat /home/$YOU/.zen/astrXbian/www/boris/youtube_watch_step2.html \ | sed "s/\${IPNSLINK}/$IPNSLINK/g" \ | sed "s/\${IPFSNODEID}/$IPFSNODEID/g" \ @@ -110,6 +116,8 @@ do | sed "s/\${TITLE}/$TITLE/g" \ > ~/.zen/ipfs/.${IPFSNODEID}/KEY/${mediakey}/index.html + [ ! -s ~/.zen/ipfs/.${IPFSNODEID}/KEY/${mediakey}/index.html ] && echo "Problem creating ~/.zen/ipfs/.${IPFSNODEID}/KEY/${mediakey}/index.html. EXIT" && exit 1 + ######################################################################## ### Scenario are G1PUB subdivized. Thus each friend can establish own contract # ~/.zen/ipfs/.${IPFSNODEID}/KEY/${INDEXPREFIX}${REFERENCE}/${G1PUB}/index.html