diff --git a/ipfs4astroport.sh b/ipfs4astroport.sh index 0497177..71d7251 100755 --- a/ipfs4astroport.sh +++ b/ipfs4astroport.sh @@ -32,7 +32,7 @@ fi [[ -d ~/.ipfs ]] && echo "IPFS install exist! Please remove or backup before executing this script EXIT" && exit 1 -echo -e "Astroport IPFS Layer installation..." +echo -e "IPFS + Astroport Light installation..." [[ $(which pip3) ]] && sudo pip3 install duniterpy || (echo "python3 pip3 is missing on your device. EXIT" && exit 1) [[ ! $(which curl) ]] && sudo apt-get install curl -y @@ -82,11 +82,6 @@ fi || ipfs init -p server ## Special Xbian init.d config -if [[ "$USER" == "xbian" ]]; then - sudo cp ~/.zen/astrXbian/.install/templates/ipfs/ipfs-initV.sh /etc/init.d/ipfs - sudo chmod 755 /etc/init.d/ipfs - sudo touch /var/log/ipfs.log && sudo chown xbian /var/log/ipfs.log -else ## DEBIAN SYSTEMCTL echo "CREATE SYSTEMD ipfs SERVICE >>>>>>>>>>>>>>>>>>" cat > /tmp/ipfs.service < ~/.zen/ipfs/.${IPFSNODEID}/_xbian.zuid ######################################################################## ######################################################################## echo "Getting tryme.addr & .mycode from OASIS --- Change oasis address to fork Astroport Code Universe --" +-- Change oasis address to fork your Astroport Code Universe --" ######################################################################## ipfs bootstrap rm --all OASIS=12D3KooWBYme2BsNUrtx4mEdNX6Yioa9AV7opWzQp6nrPs6ZKabN # aries=12D3KooWSQYTxeoZZ39SNosEKxi7RUdGTtAQAqpKeZJxjzqqrZTx -for bootnode in $(curl https://tube.copylaradio.com/ipns/$OASIS/.$OASIS/tryme.addr) +for bootnode in $(curl -s https://tube.copylaradio.com/ipns/$OASIS/.$OASIS/tryme.addr) do ## ADD $bootnode TO BOOTSTRAP ipfs bootstrap add $bootnode done -codesign=$(curl https://tube.copylaradio.com/ipns/$OASIS/.$OASIS/.mycode) +codesign=$(curl -s https://tube.copylaradio.com/ipns/$OASIS/.$OASIS/.mycode) + ######################################################################## echo "RESTARTING ipfs" ######################################################################## @@ -189,16 +175,23 @@ sleep 10 echo ".... ACTUAL SWARM PEERS ..." ipfs swarm peers -echo "Station IPFS OK - -astrXbian $codesign INSTALL OK +echo "IPFS OK +==================== +Station Astroport INSTALL Activation ~/.zen/astrXbian/zen/cron_VRFY.sh +Récupération CODE /ipfs/$codesign " + +## GETTING SAME SOURCE CODE AS OASIS mkdir -p /home/$USER/.zen/astrXbian/ ipfs get --output=/home/$USER/.zen/astrXbian/ /ipfs/$codesign +## Make scripts executable +find /home/$USER/.zen/astrXbian/ -name "*.sh" -exec chmod u+x '{}' \; +find /home/$USER/.zen/astrXbian/ -name "*.py" -exec chmod u+x '{}' \; + ######################################################################## -# SUDO permissions +echo "# Setting $USER SUDO permissions ON fail2ban mount umount apt-get apt systemctl" ######################################################################## ## USED FOR fail2ban-client (DEFCON) echo "$USER ALL=(ALL) NOPASSWD:/usr/bin/fail2ban-client" | (sudo su -c 'EDITOR="tee" visudo -f /etc/sudoers.d/fail2ban-client') @@ -211,14 +204,15 @@ echo "$USER ALL=(ALL) NOPASSWD:/usr/bin/apt" | (sudo su -c 'EDITOR="tee" visudo ## USED FOR "systemctl restart ipfs" echo "$USER ALL=(ALL) NOPASSWD:/bin/systemctl" | (sudo su -c 'EDITOR="tee" visudo -f /etc/sudoers.d/systemctl') -## INSTALL TiddlyWiki +## TODO G1SSB CONFIG +echo "## INSTALL TiddlyWiki /ipns/${IPFSNODEID}/.${IPFSNODEID}/index.html" [[ ! -f ~/.zen/ipfs/.${IPFSNODEID}/index.html ]] && mkdir -p ~/.zen/ipfs/.${IPFSNODEID} && cp ~/.zen/astrXbian/.install/templates/tiddlywiki/index.html ~/.zen/ipfs/.${IPFSNODEID}/index.html -echo "OK. +echo "Tout semble OK?! +NE PAS OUBLIER!! Ajoutez le compagnon IFPS à votre navigateur. - Documentation : https://docs.ipfs.io/install/ipfs-companion/ Traduction FR : https://translate.google.com/translate?sl=auto&tl=fr&u=https://docs.ipfs.io/install/ipfs-companion/ "