diff --git a/crowdbunker.sh b/crowdbunker.sh
index cd30b82..3f38e67 100755
--- a/crowdbunker.sh
+++ b/crowdbunker.sh
@@ -157,6 +157,7 @@ echo "##########################################################################
IsThere=$(cat ~/.zen/bunkerbox/history.json | jq .Videos[].link | grep $VUID)
if [[ ! $IsThere ]]; then
echo "Add $INDEX to ~/.zen/bunkerbox/$VUID/media/history.json"
+ ## history.json Videos.link is the HTML code displayed in index.html with pagination.js (related to)
cat ~/.zen/bunkerbox/history.json | jq '.Videos += [{"link": "
'"'_TITLE_'"'"}]' > ~/.zen/bunkerbox/$VUID/media/history.json
echo $INDEX
sed -i "s~_INDEX_~$INDEX~g" ~/.zen/bunkerbox/$VUID/media/history.json
@@ -167,11 +168,13 @@ echo "##########################################################################
# COULD BE DONE LIKE THAT
# cat ~/.zen/bunkerbox/$VUID/media/history.json | jq --arg INDEX "$INDEX" --arg TITLE "$TITLE" '.Videos += [{"link": "'''$TITLE'''"}]' > ~/.zen/bunkerbox/history.json
echo "Mise à jour ~/.zen/bunkerbox/history.json"
- [[ "$(cat ~/.zen/bunkerbox/$VUID/media/history.json)" == "" ]] && echo "FATAL ERROR MAJ" && exit 1
+ [[ "$(cat ~/.zen/bunkerbox/$VUID/media/history.json)" == "" ]] && echo "FATAL ERROR" && exit 1
+ # Upgrade local history.json with latest one
[[ -f ~/.zen/bunkerbox/$VUID/media/history.json ]] && cp -f ~/.zen/bunkerbox/$VUID/media/history.json ~/.zen/bunkerbox/history.json
fi
- echo "" > ~/.zen/bunkerbox/index.html
+ # Create local index.html redirecting to current latest IPFS video
+ echo "" > ~/.zen/bunkerbox/index.html
echo "===== INDEX ===== $IPFSNGW/ipfs/$IPFSROOT"
echo "HISTORY : $IPFSNGW/ipfs/$IPFSROOT/history.json"
@@ -227,9 +230,16 @@ echo "##########################################################################
############################################
## FIRST PUBLISH index.html (REDIRECT) + history.json + ts
mkdir -p /tmp/$VUID
- echo "" > /tmp/$VUID/index.html
+ ## This is the welcome page of your qo-op channel.
+ # Could be redirect, or ... Your homepage is introduced there !!
+ # echo "" > /tmp/$VUID/index.html
+ cp ${MY_PATH}/templates/homepage.html > /tmp/$VUID/index.html
+ cp ${MY_PATH}/templates/crowbunkerbox.png /tmp/$VUID/
+ sed -i "s~_IPNSL_~$IPNSL~g" /tmp/$VUID/index.html
+
cp ~/.zen/bunkerbox/history.json /tmp/$VUID/history.json
echo "$TS" > /tmp/$VUID/ts # TimeStamping
+
VROOT=$(ipfs add -wHq /tmp/$VUID/* | tail -n 1)
ipfs name publish --key=qo-op /ipfs/$VROOT
echo "qo-op : $IPFSNGW/ipns/$IPNS/history.json REDIRECT TO /ipfs/$VROOT"
@@ -246,7 +256,7 @@ echo "##########################################################################
if [[ ! $InHere ]]; then
echo "NOUVELLE VIDEO."
mkdir -p /tmp/$VUID
- echo "" > /tmp/$VUID/index.html
+ # echo "" > /tmp/$VUID/index.html
cp ~/.zen/bunkerbox/history.json /tmp/$VUID/history.json
echo "$TS" > /tmp/$VUID/ts # TimeStamping
diff --git a/templates/crowbunkerbox.png b/templates/crowbunkerbox.png
new file mode 100644
index 0000000..e02fc26
Binary files /dev/null and b/templates/crowbunkerbox.png differ
diff --git a/templates/homepage.html b/templates/homepage.html
new file mode 100644
index 0000000..b4fad3d
--- /dev/null
+++ b/templates/homepage.html
@@ -0,0 +1,120 @@
+
+
+
+
+ [BunkerBOX] Home
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Activez IPFS !
+
+
+ - Débutant, sous Windows ou Mac ? Installez IPFS Desktop à votre OS
+ - Conscient, sous Linux? Ajoutez go-ipfs à votre système
+ - Rendre son navigateur compatible avec ipfs-companion !!
+
+ Bunker BOX ready ? Postulez pour devenir Hébergeur officiel de BunkerBOX.
Contactez support@qo-op.com
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+