corrections
This commit is contained in:
parent
f09089c22c
commit
c2fdfd4946
|
@ -7,6 +7,9 @@
|
|||
MY_PATH="`dirname \"$0\"`" # relative
|
||||
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
|
||||
ME="${0##*/}"
|
||||
YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1) && [[ ! $YOU ]] && echo "ipfs NOT RUNNING. EXIT" && exit 1
|
||||
G1PUB=$(cat ~/.zen/secret.dunikey | grep 'pub:' | cut -d ' ' -f 2) && [[ ! $G1PUB ]] && echo "ERREUR G1PUB. EXIT" && exit 1
|
||||
IPFSNODEID=$(ipfs id -f='<id>\n') && [[ "$IPFSNODEID" == "" ]] && echo 'ERROR missing IPFS Node id !! IPFS is not installed !?' && exit 1
|
||||
|
||||
# CLEAN "A_my_swarm.txt" and "A_swarm_map.txt"
|
||||
rm -f ~/.zen/A_my_swarm.txt && touch ~/.zen/A_my_swarm.txt
|
||||
|
@ -15,8 +18,6 @@ rm -f ~/.zen/A_swarm_map.txt && touch ~/.zen/A_swarm_map.txt
|
|||
########################################################################
|
||||
# ENVIRONEMENT DETECTION + IPFS ~/.zen/ipfs/.$IPFSNODEID/G1SSB/_info
|
||||
########################################################################
|
||||
IPFSNODEID=$(ipfs id -f='<id>\n')
|
||||
[[ $IPFSNODEID == "" ]] && echo "ERROR missing IPFS Node id !! IPFS is not installed !?" && exit 1
|
||||
isIPFSRunning=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d ' ' -f 1)
|
||||
[[ ! $isIPFSRunning ]] && echo "ERROR! ipfs daemon is not running. EXIT" && exit 1
|
||||
########################################################################
|
||||
|
|
|
@ -7,20 +7,15 @@
|
|||
MY_PATH="`dirname \"$0\"`" # relative
|
||||
MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized
|
||||
ME="${0##*/}"
|
||||
YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1) && [[ ! $YOU ]] && echo "ipfs NOT RUNNING. EXIT" && exit 1
|
||||
G1PUB=$(cat ~/.zen/secret.dunikey | grep 'pub:' | cut -d ' ' -f 2) && [[ ! $G1PUB ]] && echo "ERREUR G1PUB. EXIT" && exit 1
|
||||
IPFSNODEID=$(ipfs id -f='<id>\n') && [[ "$IPFSNODEID" == "" ]] && echo 'ERROR missing IPFS Node id !! IPFS is not installed !?' && exit 1
|
||||
########################################################################
|
||||
# \\///
|
||||
# qo-op
|
||||
############# '$MY_PATH/$ME'
|
||||
########################################################################
|
||||
# ex: ./'$ME'
|
||||
########################################################################
|
||||
# This script is controling IPFS swarm
|
||||
# Sync friends peers ~/.zen/ipfs/ into ~/.zen/ipfs_swarm/.IPFSNODEID's/ directories
|
||||
# add not friend_of_mine IPs to fail2ban
|
||||
########################################################################
|
||||
# TODO remove because now it is in~/.bashrc
|
||||
export YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1)
|
||||
export IPFSNODEID=$(ipfs id -f='<id>\n') && [[ ! $IPFSNODEID ]] && exit 1
|
||||
########################################################################
|
||||
mkdir -p ~/.zen/ipfs_swarm
|
||||
echo '
|
||||
|
|
|
@ -60,7 +60,7 @@ case ${CAT} in
|
|||
youtube)
|
||||
INDEXPREFIX="YOUTUBE_"
|
||||
REFERENCE=$(echo "$path" | cut -d '/' -f 6 )
|
||||
TITLE=$(echo "$file" | cut -d "/" -f 2-)
|
||||
TITLE="${file%.*}"
|
||||
;;
|
||||
mp3)
|
||||
## DIFFERENT TREATMENT
|
||||
|
|
Loading…
Reference in New Issue