~/.ipfs/config
This commit is contained in:
parent
891da96b04
commit
ebf24c4bc8
|
@ -101,7 +101,7 @@ mv /tmp/secret.dunikey ~/.zen/secret.dunikey
|
|||
[[ -f ~/.zen/secret.ipfs ]] && mv ~/.zen/secret.ipfs ~/.zen/secret.ipfs.old.$timestamp
|
||||
mv /tmp/secret.ipfs ~/.zen/secret.ipfs
|
||||
|
||||
[[ -f ~/.ipfs/config ]] && mv ~/.ipfs/config ~/.ipfs/config.old.$timestamp
|
||||
#[[ -f ~/.ipfs/config ]] && mv ~/.ipfs/config ~/.ipfs/config.old.$timestamp
|
||||
mv /tmp/config.ipfs ~/.ipfs/config
|
||||
|
||||
|
||||
|
|
|
@ -1,70 +0,0 @@
|
|||
#!/bin/bash
|
||||
########################################################################
|
||||
# Author: Fred (support@qo-op.com)
|
||||
# Version: 2020.12.05
|
||||
# License: AGPL-3.0 (https://choosealicense.com/licenses/agpl-3.0/)
|
||||
########################################################################
|
||||
# Transfert ~/astroport/animes to IPFS
|
||||
# Create Astroport(pastebin) index for Xbian/Vstream
|
||||
# ipfs publish with xbian key
|
||||
########################################################################
|
||||
file="$1"
|
||||
mkdir -p ~/astroport/animes
|
||||
[[ ! -f ~/.zen/ipfs/.${IPFSNODEID}/_xbian.zuid ]] && echo "ERROR no _xbian.zuid" && exit 1
|
||||
[[ $file == "" ]] && echo "ERROR NO FILE $file" && exit 1
|
||||
|
||||
# GET XZUID
|
||||
XZUID=$(cat ~/.zen/ipfs/.${IPFSNODEID}/_xbian.zuid)
|
||||
|
||||
# CREATE Vstream/Pastebin file format
|
||||
# https://github.com/Kodi-vStream/venom-xbmc-addons/wiki/Voir-et-partager-sa-biblioth%C3%A8que-priv%C3%A9e#d%C3%A9clarer-des-films
|
||||
|
||||
### Animes
|
||||
echo "ADDING ~/astroport/animes/ to IPFS. should be only one file"
|
||||
echo "-----------------------------------------------------------------"
|
||||
|
||||
AASHARE=$(ipfs add -rq ~/astroport/animes/ | tail -n 1)
|
||||
[[ $AASHARE == "" ]] && echo "ipfs add ERROR" && exit 1
|
||||
|
||||
echo "WRITE own ~/.zen/ipfs/xbian/A$XZUID Animes index"
|
||||
echo "-----------------------------------------------------------------"
|
||||
mkdir -p ~/.zen/ipfs/xbian
|
||||
[[ ! -f ~/.zen/ipfs/xbian/A${XZUID} ]] && echo "CAT;TITLE;URLS" > ~/.zen/ipfs/xbian/A${XZUID}
|
||||
|
||||
|
||||
filename=$(basename -- "$file")
|
||||
extension="${filename##*.}"
|
||||
filena="${filename%.*}"
|
||||
echo "animes;$filena;http://localhost:10021/ipfs/$AASHARE/$filename" >> ~/.zen/ipfs/xbian/A${XZUID}
|
||||
|
||||
rm -f "/home/$YOU/astroport/animes/$file"
|
||||
cat ~/.zen/ipfs/xbian/A${XZUID} | uniq > /tmp/A${XZUID}
|
||||
mv /tmp/A${XZUID} ~/.zen/ipfs/xbian/A${XZUID}
|
||||
|
||||
########################################################################
|
||||
echo "PUBLISH ~/.zen/ipfs to IPNS self"
|
||||
echo "-----------------------------------------------------------------"
|
||||
MIPFS=$(ipfs add -rHq ~/.zen/ipfs | tail -n 1)
|
||||
NODEIPNS=$(ipfs name publish --quieter /ipfs/$MIPFS)
|
||||
|
||||
ipfs cat /ipns/$IPFSNODEID/xbian/A${XZUID}
|
||||
|
||||
echo "SYNCing SWARM..."
|
||||
echo "-----------------------------------------------------------------"
|
||||
~/.zen/astrXbian/zen/ipfs_SWARM_refresh.sh
|
||||
|
||||
echo "PREPARE GLOBAL AASTRXBIAN (animes) global swarm list from ipfs_swarm"
|
||||
echo "-----------------------------------------------------------------"
|
||||
mkdir -p /tmp/xbian/
|
||||
mkdir -p ~/.zen/xbian/
|
||||
|
||||
echo 'CAT;TITLE;URL' > /tmp/xbian/AASTRXBIAN
|
||||
# Get all animes published in swarm
|
||||
cat ~/.zen/ipfs_swarm/xbian/A* | grep -v -E 'CAT;TITLE;URL' >> /tmp/xbian/AASTRXBIAN
|
||||
# Create global swarm animes index
|
||||
cat /tmp/xbian/AASTRXBIAN | uniq > ~/.zen/xbian/AASTRXBIAN
|
||||
|
||||
echo "PUBLISH ~/.zen/xbian/ IPNS with 'xbian' key"
|
||||
echo "-----------------------------------------------------------------"
|
||||
ISTREAM=$(ipfs add -qrw ~/.zen/xbian/ | tail -n 1)
|
||||
ipfs name publish -k xbian $ISTREAM
|
|
@ -1,70 +0,0 @@
|
|||
#!/bin/bash
|
||||
########################################################################
|
||||
# Author: Fred (support@qo-op.com)
|
||||
# Version: 2020.12.05
|
||||
# License: AGPL-3.0 (https://choosealicense.com/licenses/agpl-3.0/)
|
||||
########################################################################
|
||||
# Transfert ~/astroport/films to IPFS
|
||||
# Create Astroport(pastebin) index for Xbian/Vstream
|
||||
# ipfs publish ~/.zen/xbian/INDEXes with xbian key
|
||||
########################################################################
|
||||
file="$1"
|
||||
mkdir -p ~/astroport/films
|
||||
[[ ! -f ~/.zen/ipfs/.${IPFSNODEID}/_xbian.zuid ]] && echo "ERROR no _xbian.zuid" && exit 1
|
||||
[[ $file == "" ]] && echo "ERROR NO FILE $file" && exit 1
|
||||
|
||||
# GET XZUID
|
||||
XZUID=$(cat ~/.zen/ipfs/.${IPFSNODEID}/_xbian.zuid)
|
||||
|
||||
# CREATE Vstream/Pastebin file format
|
||||
# https://github.com/Kodi-vStream/venom-xbmc-addons/wiki/Voir-et-partager-sa-biblioth%C3%A8que-priv%C3%A9e#d%C3%A9clarer-des-films
|
||||
|
||||
### Films
|
||||
echo "ADDING ~/astroport/films/ to IPFS. should be only one file"
|
||||
echo "-----------------------------------------------------------------"
|
||||
|
||||
AFSHARE=$(ipfs add -rq ~/astroport/films | tail -n 1)
|
||||
[[ $AFSHARE == "" ]] && echo "ipfs add ERROR" && exit 1
|
||||
|
||||
echo "WRITE own ~/.zen/ipfs/xbian/F$XZUID Films index"
|
||||
echo "-----------------------------------------------------------------"
|
||||
mkdir -p ~/.zen/ipfs/xbian
|
||||
[[ ! -f ~/.zen/ipfs/xbian/F${XZUID} ]] && echo "CAT;TITLE;URLS" > ~/.zen/ipfs/xbian/F${XZUID}
|
||||
|
||||
filename=$(basename -- "$file")
|
||||
extension="${filename##*.}"
|
||||
filena="${filename%.*}"
|
||||
echo "films;$filena;http://localhost:10021/ipfs/$AFSHARE/$filename" >> ~/.zen/ipfs/xbian/F${XZUID}
|
||||
|
||||
rm -f "/home/$YOU/astroport/films/$file"
|
||||
cat ~/.zen/ipfs/xbian/F${XZUID} | uniq > /tmp/F${XZUID}
|
||||
mv /tmp/F${XZUID} ~/.zen/ipfs/xbian/F${XZUID}
|
||||
|
||||
########################################################################
|
||||
echo "PUBLISH ~/.zen/ipfs to IPNS self"
|
||||
echo "-----------------------------------------------------------------"
|
||||
MIPFS=$(ipfs add -rHq ~/.zen/ipfs | tail -n 1)
|
||||
NODEIPNS=$(ipfs name publish --quieter /ipfs/$MIPFS)
|
||||
|
||||
ipfs cat /ipns/$IPFSNODEID/xbian/F${XZUID}
|
||||
|
||||
echo "SYNCing SWARM..."
|
||||
echo "-----------------------------------------------------------------"
|
||||
~/.zen/astrXbian/zen/ipfs_SWARM_refresh.sh
|
||||
|
||||
echo "PREPARE GLOBAL FASTRXBIAN (animes) global swarm list from ipfs_swarm"
|
||||
echo "-----------------------------------------------------------------"
|
||||
mkdir -p /tmp/xbian/
|
||||
mkdir -p ~/.zen/xbian/
|
||||
|
||||
echo 'CAT;TITLE;URL' > /tmp/xbian/FASTRXBIAN
|
||||
# Get all animes published in swarm
|
||||
cat ~/.zen/ipfs_swarm/xbian/F* | grep -v -E 'CAT;TITLE;URL' >> /tmp/xbian/FASTRXBIAN
|
||||
# Create global swarm animes index
|
||||
cat /tmp/xbian/FASTRXBIAN | uniq > ~/.zen/xbian/FASTRXBIAN
|
||||
|
||||
echo "PUBLISH ~/.zen/xbian/ IPNS with 'xbian' key"
|
||||
echo "-----------------------------------------------------------------"
|
||||
ISTREAM=$(ipfs add -qrw ~/.zen/xbian/ | tail -n 1)
|
||||
ipfs name publish -k xbian $ISTREAM
|
||||
|
Loading…
Reference in New Issue