diff --git a/zen/new_file_in_astroport.sh b/zen/new_file_in_astroport.sh index 3fb243d..210b9be 100755 --- a/zen/new_file_in_astroport.sh +++ b/zen/new_file_in_astroport.sh @@ -229,6 +229,13 @@ if [[ ! -d ~/.zen/ipfs/.${IPFSNODEID}/KEY/${MEDIAKEY}/${G1PUB}/${PINnode} && "$P $MY_PATH/tools/natools.py encrypt -p $PINnode -i /tmp/.ipfsid -o "~/.zen/ipfs/.${IPFSNODEID}/KEY/${MEDIAKEY}/${G1PUB}/${PINnode}/.ipfsid.encrypt" # .ipfsid.encrypt is searched by each Station running ./zen/tools/autoPINfriends.sh fi + +## Ask PIN to myself +mkdir -p ~/.zen/ipfs/.${IPFSNODEID}/KEY/${MEDIAKEY}/${G1PUB}/${G1PUB} +$MY_PATH/tools/natools.py encrypt -p $G1PUB -i /tmp/.ipfs.filelink -o "~/.zen/ipfs/.${IPFSNODEID}/KEY/${MEDIAKEY}/${G1PUB}/${G1PUB}/.ipfs.filelink.encrypt" +$MY_PATH/tools/natools.py encrypt -p $G1PUB -i /tmp/.ipfsid -o "~/.zen/ipfs/.${IPFSNODEID}/KEY/${MEDIAKEY}/${G1PUB}/${G1PUB}/.ipfsid.encrypt" + + ######################################################################## ## GREAT natools can convert IPNS MEDIAKEY into .dunikey file ######################################################################## @@ -512,5 +519,5 @@ echo "#### EXCECUTION TIME" end=`date +%s` echo Execution time was `expr $end - $start` seconds. echo "########################################################################" -zenity --warning --width 300 --text "Votre MEDIA a rejoint ASTROPORT en `expr $end - $start` secondes" +[[ ! $3 ]] && zenity --warning --width 300 --text "Votre MEDIA a rejoint ASTROPORT en `expr $end - $start` secondes" exit 0