diff --git a/install.sh b/install.sh index 0ae1d247..abef459f 100755 --- a/install.sh +++ b/install.sh @@ -44,7 +44,7 @@ echo "#############################################" echo "######### INSTALL BASE & PYTHON3 PACKAGE ####" echo "#############################################" -for i in git make cmake fail2ban npm netcat-traditional ncdu chromium miller inotify-tools curl net-tools libsodium* libcurl4-openssl-dev python3-pip python3-setuptools python3-wheel python3-dotenv python3-gpg python3-jwcrypto python3-brotli mpack; do +for i in git make cmake fail2ban npm netcat-traditional ncdu chromium* miller inotify-tools curl net-tools libsodium* libcurl4-openssl-dev python3-pip python3-setuptools python3-wheel python3-dotenv python3-gpg python3-jwcrypto python3-brotli mpack; do if [ $(dpkg-query -W -f='${Status}' $i 2>/dev/null | grep -c "ok installed") -eq 0 ]; then echo ">>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Installation $i <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<" sudo apt install -y $i @@ -143,16 +143,14 @@ for i in pip setuptools wheel cryptography==3.4.8 Ed25519 base58 google duniterp [[ $? != 0 ]] && echo "INSTALL $i FAILED." && echo "python3 -m pip install -U $i FAILED." >> /tmp/install.errors.log && continue done -cat /tmp/install.errors.log - echo "#############################################" echo "######### IMPRIMANTE & G1BILLET ##############" echo "#############################################" ########### QRCODE : G1VISA / G1BILLET : PRINTER ############## if [[ $USER != 'xbian' ]]; then - echo "INSTALL PRINTER FOR G1BILLET G1CARD G1VISA ? ENTER 'yes' or Hit enter to bypass." - read saisie + echo "INSTALL PRINTER FOR G1BILLET G1CARD G1VISA ..." + saisie="OK" if [[ $saisie != "" ]]; then ## PRINT & FONTS sudo apt install ttf-mscorefonts-installer printer-driver-all cups -y @@ -180,10 +178,11 @@ echo "#############################################" echo "######### SYSTEM SETUP #########################" echo "#############################################" -echo "=== SETUP IPFS SYSTEM" +echo "=== SETUP IPFS" ~/.zen/Astroport.ONE/tools/ipfs_setup.sh echo "/ip4/127.0.0.1/tcp/5001" > ~/.ipfs/api +echo "=== SETUP ASTROPORT" ~/.zen/Astroport.ONE/setup.sh @@ -201,10 +200,13 @@ echo "#############################################" ) & fi + echo "#############################################" +echo "### ANY ERRORS ?" +cat /tmp/install.errors.log echo "#############################################" - echo "Astroport.ONE INSTALLATION FINISHED" - end=`date +%s` +echo "Astroport.ONE INSTALLATION FINISHED" +end=`date +%s` echo Execution time was `expr $end - $start` seconds. echo "#############################################" echo "CREEZ VOTRE COMPTE SUR" @@ -216,6 +218,7 @@ echo "#############################################" ## ON BOARDING PLAYER # ~/.zen/Astroport.ONE/start.sh espeak "Please create a player" + [[ $XDG_SESSION_TYPE == 'x11' ]] \ && xdg-open "http://astroport.localhost:1234" \ || ~/.zen/Astroport.ONE/command.sh diff --git a/setup.sh b/setup.sh index e9e33e3c..d9d51492 100755 --- a/setup.sh +++ b/setup.sh @@ -101,7 +101,7 @@ ACTUAL=$(cat /etc/resolv.conf | grep -w nameserver | head -n 1) if [[ $(echo $ACTUAL | grep "1.1.1.1") == "" ]] ; then ######################################################################## -echo "ADDING nameserver 1.1.1.1 TO /etc/resolv.conf TO BYPASS LAN COUNTRY RESTRICTIONS" # Avoid provider restrictions +echo "ADDING nameserver 1.1.1.1 TO /etc/resolv.conf TO BYPASS COUNTRY RESTRICTIONS" # Avoid provider restrictions ######################################################################## sudo chattr -i /etc/resolv.conf @@ -124,10 +124,10 @@ if [[ ! $(cat /etc/hosts | grep -w "astroport.local" | head -n 1) ]]; then echo "127.0.1.1 $(hostname) $(hostname).local astroport astroport.local" >> /tmp/hosts sudo cp /tmp/hosts /etc/hosts && rm /tmp/hosts fi + ### ADD 20h12.sh CRON ############### ~/.zen/Astroport.ONE/tools/cron_VRFY.sh ON - echo "#############################################" ## INSTALL yt-dlp & SYMLINK youtube-dl ~/.zen/Astroport.ONE/youtube-dl.sh diff --git a/tools/install.youtube-dl.sh b/tools/install.youtube-dl.sh deleted file mode 100755 index f828cef9..00000000 --- a/tools/install.youtube-dl.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash -######################################################################## -MY_PATH="`dirname \"$0\"`" # relative -MY_PATH="`( cd \"$MY_PATH\" && pwd )`" # absolutized and normalized -ME="${0##*/}" -######## YOUTUBE-DL ########## -if [[ $(which youtube-dl) ]]; then - sudo apt-get remove youtube-dl -fi - sudo wget https://yt-dl.org/downloads/latest/youtube-dl -O /usr/local/bin/youtube-dl || sudo cp $MY_PATH/youtube-dl /usr/local/bin/ || (echo "error installing youtube-dl" && exit 1) - sudo chmod a+rx /usr/local/bin/youtube-dl - sudo chown $USER /usr/local/bin/youtube-dl - youtube-dl -U - diff --git a/tools/ipfs_setup.sh b/tools/ipfs_setup.sh index 64673d10..005237b5 100755 --- a/tools/ipfs_setup.sh +++ b/tools/ipfs_setup.sh @@ -78,7 +78,7 @@ User=_USER_ RestartSec=1 Restart=always Environment=IPFS_FD_MAX=8192 -ExecStart=/usr/local/bin/ipfs daemon --migrate +ExecStart=/usr/local/bin/ipfs daemon --migrate --enable-namesys-pubsub CPUAccounting=true CPUQuota=60%