Sending IPFSTRYME message to $liking_me if ISO already config BOOT
This commit is contained in:
parent
8efc0075ba
commit
a1ad3390d8
20
ISOconfig.sh
20
ISOconfig.sh
|
@ -16,7 +16,22 @@
|
||||||
########################################################################
|
########################################################################
|
||||||
|
|
||||||
# CHECK IF CONFIG ALREADY DONE !! Remove ~/.zen/ipfs ~/.zen/secret ~/.zen/ipfs.sync
|
# CHECK IF CONFIG ALREADY DONE !! Remove ~/.zen/ipfs ~/.zen/secret ~/.zen/ipfs.sync
|
||||||
[[ -f ~/.zen/ipfs.sync ]] && echo "CONFIG ALREADY DONE" && source ~/.zen/ipfs.sync && exit 0
|
if [[ -f ~/.zen/ipfs.sync ]]; then
|
||||||
|
echo "CONFIG ALREADY DONE"
|
||||||
|
source ~/.zen/ipfs.sync
|
||||||
|
# NEW BOOT! SEND ipfstryme message to my friends...
|
||||||
|
cd ~/.zen/astroport/zen/jaklis
|
||||||
|
# GET LIST of issuer(s) who likes me
|
||||||
|
for liking_me in $(./jaklis.py like | jq -r '.likes[].issuer');
|
||||||
|
do
|
||||||
|
# CHECk if I am liking him either
|
||||||
|
friend_of_mine=$(./jaklis.py like -p $liking_me | jq -r '.yours');
|
||||||
|
echo "Sending IPFSTRYME message to $liking_me"
|
||||||
|
[[ $friend_of_mine != null ]] && ./jaklis.py send -d $liking_me -t "ipfstryme" -f ~/.zen/ipfs/.${IPFSNODEID}/tryme.addr
|
||||||
|
done
|
||||||
|
cd -
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
# CHECK INTERNET CONNECTIVITY !!
|
# CHECK INTERNET CONNECTIVITY !!
|
||||||
ping -q -w 1 -c 1 `ip r | grep default | cut -d ' ' -f 3` > /dev/null && echo ok || (echo "NO INTERNET CONNEXION" && exit 1)
|
ping -q -w 1 -c 1 `ip r | grep default | cut -d ' ' -f 3` > /dev/null && echo ok || (echo "NO INTERNET CONNEXION" && exit 1)
|
||||||
|
@ -159,7 +174,8 @@ echo 'INSTALL Astroport cron_MINUTE'
|
||||||
~/.zen/astroport/zen/tools/cron_VRFY.sh
|
~/.zen/astroport/zen/tools/cron_VRFY.sh
|
||||||
|
|
||||||
# Run only once: comment /etc/rc.local (su - xbian -c "~/.zen/astroport/ISOconfig.sh")
|
# Run only once: comment /etc/rc.local (su - xbian -c "~/.zen/astroport/ISOconfig.sh")
|
||||||
sudo sed -i s/su/\#su/g /etc/rc.local
|
# sudo sed -i s/su/\#su/g /etc/rc.local
|
||||||
|
# BETTER NOT: Send new 'ipfstryme' message on each boot is done instead
|
||||||
|
|
||||||
########################################################################
|
########################################################################
|
||||||
echo 'REBOOT NOW...'
|
echo 'REBOOT NOW...'
|
||||||
|
|
Loading…
Reference in New Issue