Compare commits
No commits in common. "master" and "make_it" have entirely different histories.
|
@ -90,7 +90,7 @@ ipfs config --json Experimental.Libp2pStreamMounting true
|
|||
ipfs config --json Experimental.P2pHttpProxy true
|
||||
ipfs config --json Swarm.ConnMgr.LowWater 0
|
||||
ipfs config --json Swarm.ConnMgr.HighWater 0
|
||||
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["http://astroport", "https://astroport.com", "https://qo-op.com", "https://tube.copylaradio.com" ]'
|
||||
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Origin '["*"]'
|
||||
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Methods '["PUT", "GET", "POST"]'
|
||||
ipfs config --json API.HTTPHeaders.Access-Control-Allow-Credentials '["true"]'
|
||||
######### CLEAN DEFAULT BOOTSTRAP TO STAY INVISIBLE ###########
|
||||
|
|
|
@ -302,7 +302,6 @@ echo "$USER ALL=(ALL) NOPASSWD:/usr/local/bin/brother_ql_print" | (sudo su -c 'E
|
|||
|
||||
## INSTALL TiddlyWiki
|
||||
[[ ! -f ~/.zen/ipfs/.${IPFSNODEID}/index.html ]] && mkdir -p ~/.zen/ipfs/.${IPFSNODEID} && cp ~/.zen/astrXbian/.install/templates/tiddlywiki/index.html ~/.zen/ipfs/.${IPFSNODEID}/index.html
|
||||
[[ -f ~/.zen/Astroport.ONE/templates/moawiki.html ]] && cp ~/.zen/Astroport.ONE/templates/moawiki.html ~/.zen/ipfs/.${IPFSNODEID}/index.html
|
||||
|
||||
|
||||
########################################################################
|
||||
|
|
|
@ -112,7 +112,7 @@ YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail
|
|||
|
||||
########################################################################
|
||||
# CHOOSE CATEGORY (remove anime, not working!)
|
||||
[[ $CHOICE == "" ]] && CHOICE=$(zenity --entry --width 300 --title="Catégorie" --text="Choisissez la catégorie de votre ajout" --entry-text="AstroBlog" Film Serie Youtube Video)
|
||||
[[ $CHOICE == "" ]] && CHOICE=$(zenity --entry --width 300 --title="Catégorie" --text="Choisissez la catégorie de votre ajout" --entry-text="Film" Serie Youtube Video Astronaute)
|
||||
[[ $CHOICE == "" ]] && exit 1
|
||||
|
||||
# LOWER CARACTERS
|
||||
|
@ -136,16 +136,15 @@ case ${CAT} in
|
|||
#
|
||||
#
|
||||
########################################################################
|
||||
astroblog)
|
||||
astronaute)
|
||||
|
||||
# INSTASCAN G1PUB CAPTURE
|
||||
~/.zen/Astroport.ONE/tools/instascan_login.sh "ONE"
|
||||
# INSTASCAN G1PUB CAPTURE
|
||||
~/.zen/Astroport.ONE/tools/instascan_login.sh "ONE"
|
||||
|
||||
zenity --warning --width 300 --text "$PLAYER. Prêt à enregistrer votre video ?"
|
||||
|
||||
## RECORD WEBCAM VIDEO
|
||||
~/.zen/Astroport.ONE/tools/vlc_webcam.sh
|
||||
if [[ $CAPTAIN == $PLAYER ]]; then
|
||||
zenity --warning --width 300 --text "Bienvenue $PLAYER"
|
||||
|
||||
fi
|
||||
|
||||
exit 0
|
||||
;;
|
||||
|
@ -588,7 +587,6 @@ echo "MEDIAKEY=${MEDIAKEY}" > ~/astroport/Add_${MEDIAKEY}_script.sh
|
|||
# ~/.zen/astrXbian/zen/new_file_in_astroport.sh \"$HOME/astroport/${CAT}/${MEDIAID}/\" \"${FILE_NAME}.mp4\"
|
||||
#else" >> ~/astroport/Add_${MEDIAKEY}_script.sh
|
||||
|
||||
# $3 is the G1PUB of the PLAYER (search in code to find where)
|
||||
echo "~/.zen/astrXbian/zen/new_file_in_astroport.sh \"$HOME/astroport/${CAT}/${MEDIAID}/\" \"${FILE_NAME}\" \"$3\"" >> ~/astroport/Add_${MEDIAKEY}_script.sh
|
||||
|
||||
#[[ $CHOICE == "TMDB" ]] && echo "fi" >> ~/astroport/Add_${MEDIAKEY}_script.sh
|
||||
|
|
|
@ -218,9 +218,7 @@ fi
|
|||
## SYNC GCHANGE EVERY 12 hours runtime
|
||||
if [[ $(($runtime % 725)) == 0 || "$runtime" == "5" ]]; then
|
||||
kill -9 $(ps auxf --sort=+utime | grep -w gchange_INIT.sh | grep -v -E 'color=auto|grep' | tail -n 1 | awk '{print $2}') && echo "KILLING gchange_INIT.sh"
|
||||
# $MY_PATH/zen/gchange_INIT.sh 2>&1 > /home/${YOU}/.zen/ipfs/.${IPFSNODEID}/.log.gchange_INIT.txt
|
||||
# ~/.zen/Astroport.ONE/tools/Connect_PLAYER_To_Gchange.sh > /home/${YOU}/.zen/ipfs/.${IPFSNODEID}/.log.gchange_INIT.tx
|
||||
# TODO REWRITE GCHANGE SYNC.
|
||||
$MY_PATH/zen/gchange_INIT.sh 2>&1 > /home/${YOU}/.zen/ipfs/.${IPFSNODEID}/.log.gchange_INIT.txt
|
||||
fi
|
||||
# If NEW ~/.ipfs/config.new => restarting IPFS daemon (not too often as 6h)
|
||||
if [[ -f ~/.ipfs/config.new && $(diff ~/.ipfs/config.new ~/.ipfs/config) && $runtime -gt 360 ]]; then
|
||||
|
@ -240,8 +238,8 @@ if [[ $(($runtime % 26)) == 0 ]]; then
|
|||
kill -9 $(ps auxf --sort=+utime | grep -w ipfs_SWARM_refresh.sh | grep -v -E 'color=auto|grep' | tail -n 1 | awk '{print $2}') && echo "KILLING ipfs_SWARM_refresh.sh"
|
||||
killall chromium
|
||||
$MY_PATH/zen/ipfs_SWARM_refresh.sh 2>&1 > /home/${YOU}/.zen/ipfs/.${IPFSNODEID}/.log.ipfs_SWARM_refresh.txt
|
||||
$MY_PATH/zen/tools/autoPINfriends.sh 2>&1 > /home/${YOU}/.zen/ipfs/.${IPFSNODEID}/.log.autoPINfriends.txt
|
||||
fi
|
||||
|
||||
##################################################################
|
||||
#
|
||||
# _________ ______
|
||||
|
|
142
include.sh
142
include.sh
|
@ -1,6 +1,77 @@
|
|||
#!/bin/bash
|
||||
[ "${DEBUG}" ] && set -x
|
||||
|
||||
check_requirements() {
|
||||
[[ ! $(which ipfs) ]] && echo "=== installez ipfs !!" && echo "https://docs.ipfs.io/install/command-line/#official-distributions" && exit 1
|
||||
echo "astrxbian installateur pour distributions debian et dérivées : linuxmint (https://www.linuxmint.com/) ou xbian (https://xbian.org) recommandées"
|
||||
echo "appuyez sur entrer pour commencer."; read test; [[ "$test" != "" ]] && echo "sortie" && exit 0 ## ajouter confirmation à chaque nouvelle étape (+explications)
|
||||
echo ; echo "mise à jour des dépots de votre distribution..."
|
||||
sudo apt-get update
|
||||
|
||||
[[ "$user" != "xbian" ]] &&\
|
||||
for i in x11-utils xclip zenity handbrake*; do\
|
||||
[ $(dpkg-query -w -f='${status}' $i 2>/dev/null | grep -c "ok installed") -eq 0 ] &&\
|
||||
echo ">>> installation $i <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<";\
|
||||
sudo apt install -y $i;
|
||||
done
|
||||
|
||||
for i in git fail2ban netcat-traditional inotify-tools curl net-tools libsodium* python3-dev python3-pip python3-setuptools python3-wheel python3-dotenv mpack libssl-dev libffi-dev; do
|
||||
if [ $(dpkg-query -w -f='${status}' $i 2>/dev/null | grep -c "ok installed") -eq 0 ]; then
|
||||
echo ">>> installation $i <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
|
||||
sudo apt install -y $i
|
||||
fi
|
||||
done
|
||||
|
||||
for i in build-essential qrencode jq bc file gawk yt-dlp ffmpeg sqlite dnsutils v4l-utils vlc mp3info musl-dev openssl* cargo detox nmap httrack html2text ssmtp imagemagick ttf-mscorefonts-installer libcurl4-openssl-dev; do
|
||||
if [ $(dpkg-query -w -f='${status}' $i 2>/dev/null | grep -c "ok installed") -eq 0 ]; then
|
||||
echo ">>> installation $i <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
|
||||
sudo apt install -y $i
|
||||
fi
|
||||
done
|
||||
|
||||
[[ ! $(which kodi) && "$user" != "xbian" ]] &&\
|
||||
echo ">>> installation kodi + vstream = votre videotheque ! <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<";\
|
||||
sudo apt-get install kodi -y;\
|
||||
${MY_PATH}/.install/kodi_uqload_downloader.sh
|
||||
|
||||
echo "## INSTALLATION AstroGEEK OpenCV = 'Intelligence Amie' "
|
||||
sudo apt-get install python3-opencv -y
|
||||
|
||||
## Correct PDF restrictions for imagemagick
|
||||
echo "# Correction des droits export PDF imagemagick"
|
||||
if [[ $(cat /etc/ImageMagick-6/policy.xml | grep PDF) ]]; then
|
||||
cat /etc/ImageMagick-6/policy.xml | grep -Ev PDF > /tmp/policy.xml
|
||||
sudo cp /tmp/policy.xml /etc/ImageMagick-6/policy.xml
|
||||
fi
|
||||
|
||||
echo "###########################"
|
||||
echo "## INSTALL PYTHON CRYPTO LAYER "
|
||||
echo "###########################"
|
||||
echo 'export PATH=$PATH:$HOME/.local/bin' >> ~/.bashrc && source ~/.bashrc; echo ">>> PATH=$PATH"
|
||||
python3 -m pip install -U pip
|
||||
python3 -m pip install -U setuptools wheel
|
||||
python3 -m pip install -U cryptography Ed25519 base58 google duniterpy pynacl pgpy
|
||||
python3 -m pip install -U nicotine-plus silkaj
|
||||
python3 -m pip install -U protobuf==3.19.0
|
||||
|
||||
|
||||
if [[ "$USER" == "pi" ]]; then ## PROPOSE QR_CODE PRINTER SUR RPI
|
||||
echo "Ambassade? Souhaitez vous ajouter imprimante 'brother_ql'? Saisissez OUI, sinon laissez vide et tapez sur ENTRER"
|
||||
read saisie
|
||||
if [[ $saisie != "" ]]; then
|
||||
sudo apt install printer-driver-all cups -y
|
||||
sudo pip3 install brother_ql
|
||||
sudo cupsctl --remote-admin
|
||||
sudo usermod -aG lpadmin pi
|
||||
sudo usermod -a -G gammu pi
|
||||
fi
|
||||
fi
|
||||
|
||||
# python3 -m pip install -U silkaj
|
||||
## python -> python3 link
|
||||
sudo ln -f -s /usr/bin/python3 /usr/bin/python
|
||||
}
|
||||
|
||||
i_am() {
|
||||
echo 'v0.5.0'
|
||||
}
|
||||
|
@ -22,12 +93,8 @@ import_astrXbian() {
|
|||
mkdir -p ~/.zen
|
||||
cd ~/.zen
|
||||
# TODO INSTALL FROM IPFS / IPNS
|
||||
[ ! -d astrXbian ] \
|
||||
&& git clone https://git.p2p.legal/axiom-team/astrXbian.git \
|
||||
|| GIT_DIR=astrXbian/.git git pull
|
||||
[ ! -d Astroport.ONE ] \
|
||||
&& git clone https://git.p2p.legal/qo-op/Astroport.ONE.git \
|
||||
|| GIT_DIR=Astroport.ONE git pull
|
||||
git clone https://git.p2p.legal/axiom-team/astrXbian.git
|
||||
git clone https://git.p2p.legal/qo-op/Astroport.ONE.git
|
||||
}
|
||||
|
||||
import_astroport() {
|
||||
|
@ -52,73 +119,10 @@ import_jaklis() {
|
|||
}
|
||||
|
||||
import_kodi() {
|
||||
[[ ! $(which kodi) && "$user" != "xbian" ]] &&\
|
||||
echo ">>> installation kodi + vstream = votre videotheque ! <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<" \
|
||||
&& sudo apt-get install kodi -y \
|
||||
&& ~/.zen/astrXbian/.install/kodi_uqload_downloader.sh
|
||||
|
||||
echo "=== IMPORT configuration ASTROPORT dans ~/.kodi"
|
||||
cp -Rf ~/.zen/astrXbian/.install/.kodi ~/
|
||||
}
|
||||
|
||||
install_requirements() {
|
||||
echo "mise à jour des dépots de votre distribution..."
|
||||
sudo apt-get update
|
||||
|
||||
PACKAGES=""
|
||||
INSTALL_PACKAGES=""
|
||||
[[ "$user" != "xbian" ]] && PACKAGES="x11-utils xclip zenity handbrake*"
|
||||
PACKAGES="${PACKAGES} git fail2ban netcat-traditional inotify-tools curl net-tools libsodium* python3-dev python3-pip python3-setuptools python3-wheel python3-dotenv swig libgpgme-dev mpack libssl-dev libffi-dev"
|
||||
PACKAGES="${PACKAGES} build-essential qrencode jq bc file gawk yt-dlp ffmpeg sqlite dnsutils v4l-utils vlc mp3info musl-dev openssl* cargo detox nmap httrack html2text ssmtp imagemagick libcurl4-openssl-dev"
|
||||
# python pip install dependencies
|
||||
PACKAGES="${PACKAGES} libcairo2-dev libgirepository1.0-dev pkg-config"
|
||||
# AstroGEEK OpenCV = 'Intelligence Amie'
|
||||
PACKAGES="${PACKAGES} python3-opencv"
|
||||
for package in ${PACKAGES}; do\
|
||||
[ $(dpkg-query -W -f='${status}' ${package} 2>/dev/null | grep -c "ok installed") -eq 0 ] \
|
||||
&& apt-cache show ${package} > /dev/null 2>&1 \
|
||||
&& INSTALL_PACKAGES="${INSTALL_PACKAGES} ${package}"
|
||||
done
|
||||
|
||||
[ -n "${INSTALL_PACKAGES# *}" ] \
|
||||
&& echo ">>> installation ${INSTALL_PACKAGES} <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<" \
|
||||
&& sudo apt install -y ${INSTALL_PACKAGES}
|
||||
|
||||
## Correct PDF restrictions for imagemagick
|
||||
echo "# Correction des droits export PDF imagemagick"
|
||||
if [[ $(cat /etc/ImageMagick-6/policy.xml | grep PDF) ]]; then
|
||||
cat /etc/ImageMagick-6/policy.xml | grep -Ev PDF > /tmp/policy.xml
|
||||
sudo cp /tmp/policy.xml /etc/ImageMagick-6/policy.xml
|
||||
fi
|
||||
|
||||
echo "###########################"
|
||||
echo "## INSTALL PYTHON CRYPTO LAYER "
|
||||
echo "###########################"
|
||||
echo 'export PATH=$PATH:$HOME/.local/bin' >> ~/.bashrc && source ~/.bashrc; echo ">>> PATH=$PATH"
|
||||
python3 -m pip install -U pip
|
||||
python3 -m pip install setuptools wheel
|
||||
python3 -m pip install cryptography Ed25519 base58 google duniterpy pynacl pgpy gpg
|
||||
python3 -m pip install pycairo
|
||||
python3 -m pip install nicotine-plus silkaj
|
||||
python3 -m pip install protobuf==3.19.0
|
||||
|
||||
if [[ "$USER" == "pi" ]]; then ## PROPOSE QR_CODE PRINTER SUR RPI
|
||||
echo "Ambassade? Souhaitez vous ajouter imprimante 'brother_ql'? Saisissez OUI, sinon laissez vide et tapez sur ENTRER"
|
||||
read saisie
|
||||
if [[ $saisie != "" ]]; then
|
||||
sudo apt install printer-driver-all cups -y
|
||||
sudo pip3 install brother_ql
|
||||
sudo cupsctl --remote-admin
|
||||
sudo usermod -aG lpadmin pi
|
||||
sudo usermod -a -G gammu pi
|
||||
fi
|
||||
fi
|
||||
|
||||
# python3 -m pip install -U silkaj
|
||||
## python -> python3 link
|
||||
sudo ln -f -s /usr/bin/python3 /usr/bin/python
|
||||
}
|
||||
|
||||
prepare_next_boot() {
|
||||
cat /etc/rc.local | grep -Ev "exit 0" > /tmp/new.rc.local ## REMOVE "exit 0"
|
||||
# PREPARE NEXT BOOT - Network config - NEXTBOOT - ISOConfig - NEXTBOOT - OK
|
||||
|
|
24
install.sh
24
install.sh
|
@ -1,5 +1,5 @@
|
|||
#!/bin/bash
|
||||
|
||||
. ./include.sh
|
||||
########################################################################
|
||||
# Version: 0.5.0
|
||||
# License: AGPL-3.0 (https://choosealicense.com/licenses/agpl-3.0/)
|
||||
|
@ -9,37 +9,23 @@ MY_PATH="`dirname \"$0\"`" # relative
|
|||
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
|
||||
ME="${0##*/}"
|
||||
|
||||
# INSTALLATION section of README does wget file install.sh and run it with bash
|
||||
if [ -f ${MY_PATH}/include.sh ]; then
|
||||
. ${MY_PATH}/include.sh
|
||||
else
|
||||
. <(wget -T3 -qO- https://git.p2p.legal/axiom-team/astrXbian/raw/branch/master/include.sh)
|
||||
fi
|
||||
|
||||
! type i_should_install >/dev/null 2>&1 && echo 'ERROR: Unable to load include.sh' && exit 1
|
||||
|
||||
i_am_root && echo "LANCEMENT root INTERDIT. Utilisez un simple utilisateur du groupe \"sudo\" SVP" && exit 1
|
||||
|
||||
# MAIN # SI AUCUNE CLEF DE STATION...
|
||||
if i_should_install;
|
||||
then
|
||||
|
||||
[[ ! $(which ipfs) ]] && echo "=== installez ipfs !!" && echo "https://docs.ipfs.io/install/command-line/#official-distributions" && exit 1
|
||||
echo "astrxbian installateur pour distributions debian et dérivées : linuxmint (https://www.linuxmint.com/) ou xbian (https://xbian.org) recommandées"
|
||||
echo "appuyez sur entrer pour commencer."; read test; [[ "$test" != "" ]] && echo "sortie" && exit 0 ## ajouter confirmation à chaque nouvelle étape (+explications)
|
||||
echo
|
||||
|
||||
# Install requirements
|
||||
install_requirements
|
||||
check_requirements
|
||||
|
||||
# Clone astrXbian and Astroport.One
|
||||
import_astrXbian
|
||||
|
||||
# Init ipfs
|
||||
# import_ipfs
|
||||
import_ipfs
|
||||
|
||||
# Copy astroport config in kodi
|
||||
# import_kodi
|
||||
import_kodi
|
||||
|
||||
# Jaklis setup
|
||||
import_jaklis
|
||||
|
@ -122,5 +108,3 @@ https://astroport.com
|
|||
# MAIN #
|
||||
fi
|
||||
}
|
||||
|
||||
~/.zen/astrXbian/zen/cron_VRFY.sh
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
########################################################################
|
||||
# Author: Fred (support@qo-op.com) - Rewriter - Anonymous
|
||||
# Author: Fred (support@qo-op.com)
|
||||
# Version: 2020.12.03
|
||||
# License: AGPL-3.0 (https://choosealicense.com/licenses/agpl-3.0/)
|
||||
########################################################################
|
||||
|
|
|
@ -276,7 +276,7 @@ echo "anonymous" > ~/.zen/ipfs/.${IPFSNODEID}/KEY/${MEDIAKEY}/${G1PUB}/${PINnode
|
|||
# MEMORIZE my PIN
|
||||
mkdir -p ~/.zen/PIN/${IPFSREPFILEID}/
|
||||
touch ~/.zen/PIN/${IPFSREPFILEID}/${G1PUB}
|
||||
# echo "$(ipfs key list -l | grep ${MEDIAKEY} | cut -d ' ' -f 1)" > ~/.zen/PIN/${ipfsrepidfile}/IPNSLINK # NO!! CHOOSE TODO Would let PINing nodes change index.html///
|
||||
# echo "$(ipfs key list -l | grep ${MEDIAKEY} | cut -d ' ' -f 1)" > ~/.zen/PIN/${ipfsrepidfile}/IPNSLINK # NO!! Would let PINing nodes change index.html///
|
||||
|
||||
########################################################################
|
||||
## encrypt links for myself
|
||||
|
@ -316,8 +316,6 @@ rm /tmp/.ipfsid
|
|||
# one star level (no encrypt)
|
||||
# index.html is presenting Astroport/Kodi service then redirect to
|
||||
# $G1PUB/index.html contains redirection to ipfs link
|
||||
## NEW RELEASE
|
||||
## Create TW5 index.html to give easy control access to MEDIAKEY and KEY owner
|
||||
########################################################################
|
||||
|
||||
########################################################################
|
||||
|
@ -338,44 +336,18 @@ IPNSLINK=$(ipfs key list -l | grep ${MEDIAKEY} | cut -d ' ' -f 1)
|
|||
| sed "s/\${TITLE}/$TITLE/g" \
|
||||
> ~/.zen/ipfs/.${IPFSNODEID}/KEY/${MEDIAKEY}/index.html
|
||||
|
||||
### PATCH TW5 (TODO SPLIT TEMPLATES & DIFFERENTIATE MIMETYPE TIDDLERS)
|
||||
echo "=======> Mediakey TW5 /ipns/$KEY"
|
||||
|
||||
cp ~/.zen/Astroport.ONE/templates/dreamcatcher.html ~/.zen/ipfs/.${IPFSNODEID}/KEY/${MEDIAKEY}/${G1PUB}/index.html
|
||||
MOATS=$(date -u +"%Y%m%d%H%M%S%4N")
|
||||
PSEUDO=$(cat ~/.zen/game/players/.current/.pseudo 2>/dev/null)
|
||||
sed -i "s~_MOATS_~${MOATS}~g" ~/.zen/ipfs/.${IPFSNODEID}/KEY/${MEDIAKEY}/${G1PUB}/index.html
|
||||
sed -i "s~_PLAYER_~${XZUID}~g" ~/.zen/ipfs/.${IPFSNODEID}/KEY/${MEDIAKEY}/${G1PUB}/index.html
|
||||
sed -i "s~_PSEUDO_~${PSEUDO}~g" ~/.zen/ipfs/.${IPFSNODEID}/KEY/${MEDIAKEY}/${G1PUB}/index.html
|
||||
sed -i "s~_G1PUB_~${G1PUB}~g" ~/.zen/ipfs/.${IPFSNODEID}/KEY/${MEDIAKEY}/${G1PUB}/index.html
|
||||
sed -i "s~_TITRE_~${TITLE}~g" ~/.zen/ipfs/.${IPFSNODEID}/KEY/${MEDIAKEY}/${G1PUB}/index.html
|
||||
sed -i "s~_IPFSROOT_~${IPFSREPFILEID}~g" ~/.zen/ipfs/.${IPFSNODEID}/KEY/${MEDIAKEY}/${G1PUB}/index.html
|
||||
sed -i "s~_IPFSNODEID_~${IPFSNODEID}~g" ~/.zen/ipfs/.${IPFSNODEID}/KEY/${MEDIAKEY}/${G1PUB}/index.html
|
||||
sed -i "s~_IPFSID_~${IPFSID}~g" ~/.zen/ipfs/.${IPFSNODEID}/KEY/${MEDIAKEY}/${G1PUB}/index.html
|
||||
|
||||
MIME=$(file --mime-type "$HOME/astroport/${TYPE}/${REFERENCE}/${file}" | cut -d ':' -f 2 | cut -d ' ' -f 2)
|
||||
sed -i "s~_MIME_~${MIME}~g" ~/.zen/ipfs/.${IPFSNODEID}/KEY/${MEDIAKEY}/${G1PUB}/index.html
|
||||
|
||||
sed -i "s~_MEDIAKEY_~${MEDIAKEY}~g" ~/.zen/ipfs/.${IPFSNODEID}/KEY/${MEDIAKEY}/${G1PUB}/index.html
|
||||
sed -i "s~_KEY_~${KEY}~g" ~/.zen/ipfs/.${IPFSNODEID}/KEY/${MEDIAKEY}/${G1PUB}/index.html
|
||||
|
||||
# Configure IPNS publication key
|
||||
sed -i "s~k2k4r8naeti1ny2hsk3a0ziwz22urwiu633hauluwopf4vwjk4x68qgk~${KEY}~g" ~/.zen/ipfs/.${IPFSNODEID}/KEY/${MEDIAKEY}/${G1PUB}/index.html
|
||||
|
||||
### PATCH TW5
|
||||
|
||||
## SECOND REDIRECT PAGE ${MEDIAKEY}/${G1PUB}/index.html
|
||||
# https://tube.copylaradio.com/ipns/$IPNSLINK/${G1PUB}/
|
||||
|
||||
#envsubst < ../www/boris/youtube_watch_step3.html > ~/.zen/ipfs/.${IPFSNODEID}/KEY/${MEDIAKEY}/${G1PUB}/index.html
|
||||
# echo "=======> Mediakey Contract index.html "
|
||||
# cat /home/$YOU/.zen/astrXbian/www/boris/youtube_watch_step3.html \
|
||||
# | sed "s/\${TITLE}/$TITLE/g" \
|
||||
# | sed "s/\${IPFSNODEID}/$IPFSNODEID/g" \
|
||||
# | sed "s/\${XZUID}/$XZUID/g" \
|
||||
# | sed "s/\${IPFSREPFILEID}/$IPFSREPFILEID/g" \
|
||||
# | sed "s/\${URLENCODE_FILE_NAME}/$URLENCODE_FILE_NAME/g" \
|
||||
# > ~/.zen/ipfs/.${IPFSNODEID}/KEY/${MEDIAKEY}/${G1PUB}/index.html
|
||||
echo "=======> Mediakey Contract index.html "
|
||||
cat /home/$YOU/.zen/astrXbian/www/boris/youtube_watch_step3.html \
|
||||
| sed "s/\${TITLE}/$TITLE/g" \
|
||||
| sed "s/\${IPFSNODEID}/$IPFSNODEID/g" \
|
||||
| sed "s/\${XZUID}/$XZUID/g" \
|
||||
| sed "s/\${IPFSREPFILEID}/$IPFSREPFILEID/g" \
|
||||
| sed "s/\${URLENCODE_FILE_NAME}/$URLENCODE_FILE_NAME/g" \
|
||||
> ~/.zen/ipfs/.${IPFSNODEID}/KEY/${MEDIAKEY}/${G1PUB}/index.html
|
||||
|
||||
|
||||
# echo "<meta http-equiv=\"Refresh\" content=\"0;URL=http://127.0.0.1:8080/ipfs/$IPFSREPFILEID/$URLENCODE_FILE_NAME\">" > ~/.zen/ipfs/.${IPFSNODEID}/KEY/${MEDIAKEY}/${G1PUB}/index.html
|
||||
|
|
Loading…
Reference in New Issue