From 933684ca65fc557829aabbaafcc9f36df2871e20 Mon Sep 17 00:00:00 2001 From: fred Date: Tue, 10 Aug 2021 02:06:59 +0200 Subject: [PATCH] general get_astrxbian_index.sh --- www/boris/check_bootstrap_wallet.sh | 13 +++++++++++++ www/boris/get_astrxbian_index.sh | 11 +++++++++++ 2 files changed, 24 insertions(+) create mode 100755 www/boris/check_bootstrap_wallet.sh create mode 100755 www/boris/get_astrxbian_index.sh diff --git a/www/boris/check_bootstrap_wallet.sh b/www/boris/check_bootstrap_wallet.sh new file mode 100755 index 0000000..c002cef --- /dev/null +++ b/www/boris/check_bootstrap_wallet.sh @@ -0,0 +1,13 @@ +#!/bin/bash +######################################################################## +# Author: Astrocrew +# Version: 0.1 +# License: AGPL-3.0 (https://choosealicense.com/licenses/agpl-3.0/) +######################################################################## +G1PUB=$(cat ~/.zen/secret.dunikey | grep 'pub:' | cut -d ' ' -f 2) && [[ ! $G1PUB ]] && echo "ERREUR G1PUB. EXIT" && exit 1 + +[[ $G1PUB == "" ]] && echo "G1PUB MISSING" && exit 1 +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 + +~/.zen/astrXbian/zen/jaklis/jaklis.py balance -p $G1PUB +exit 0 diff --git a/www/boris/get_astrxbian_index.sh b/www/boris/get_astrxbian_index.sh new file mode 100755 index 0000000..b65a67e --- /dev/null +++ b/www/boris/get_astrxbian_index.sh @@ -0,0 +1,11 @@ +#!/bin/bash +######################################################################## +# Author: +# Version: 0.1 +# License: AGPL-3.0 (https://choosealicense.com/licenses/agpl-3.0/) +######################################################################## +PREFIX="$1" +[[ $PREFIX == "" ]] && PREFIX="Y" +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 + +cat /home/$YOU/.zen/{ipfs,ipfs_swarm}/.*/astroport/kodi/vstream/${PREFIX}ASTRXBIAN | grep -Ev "];;" | sort | uniq | tail -n +2