|
|
|
@ -90,11 +90,18 @@ fi
|
|
|
|
|
## CHECK IF ASTROPORT/CRON/IPFS IS RUNNING
|
|
|
|
|
YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1)
|
|
|
|
|
[[ ! $YOU ]] && RUN=$(zenity --entry --width 300 --title="Astroport IPFS OFF" --text="Activer Astroport ?" --entry-text="OUI" NON) && [[ $RUN == "" || $RUN == "NON" ]] && exit 1
|
|
|
|
|
[[ $YOU && ! $1 ]] && RUN=$(zenity --entry --width 300 --title="Astroport IPFS ON" --text="Désactiver Astroport ?" --entry-text="OUI" NON)
|
|
|
|
|
[[ $YOU && ! $1 ]] && RUN=$(zenity --entry --width 300 --title="Astroport IPFS ON" --text="Désactiver Astroport ? Non, vous voulez ajouter un Media?" --entry-text="OUI" NON)
|
|
|
|
|
## DES/ACTIVATION ASTROPORT
|
|
|
|
|
[[ $RUN == "OUI" ]] && REP=$(~/.zen/astrXbian/zen/cron_VRFY.sh) && zenity --warning --width 600 --text "$REP"
|
|
|
|
|
if [[ $RUN == "OUI" ]]; then
|
|
|
|
|
STRAP=$(ipfs bootstrap)
|
|
|
|
|
BOOT=$(zenity --entry --width 300 --title="Catégorie" --text="$STRAP Changez de Bootstrap" --entry-text="Aucun" astrXbian Public)
|
|
|
|
|
[[ $BOOT == "Aucun" ]] && ipfs bootstrap rm --all
|
|
|
|
|
[[ $BOOT == "astrXbian" ]] && for bootnode in $(cat ~/.zen/astrXbian/A_boostrap_nodes.txt | grep -Ev "#"); do ipfs bootstrap add $bootnode; done
|
|
|
|
|
[[ $BOOT == "Public" ]] && for bootnode in $(cat ~/.zen/astrXbian/A_boostrap_public.txt | grep -Ev "#"); do ipfs bootstrap add $bootnode; done
|
|
|
|
|
REP=$(~/.zen/astrXbian/zen/cron_VRFY.sh) && zenity --warning --width 600 --text "$REP"
|
|
|
|
|
fi
|
|
|
|
|
YOU=$(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | tail -n 1 | cut -d " " -f 1)
|
|
|
|
|
[[ $YOU == "" ]] && exit 1
|
|
|
|
|
[[ $YOU == "" ]] && echo "IPFS not running" && exit 1
|
|
|
|
|
|
|
|
|
|
########################################################################
|
|
|
|
|
# CHOOSE CATEGORY (remove anime, not working!)
|
|
|
|
|