forked from axiom-team/astrXbian
KEY refresh index.html
This commit is contained in:
parent
155d174e35
commit
0e1c331f72
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue