some twix

This commit is contained in:
fred 2023-10-26 00:55:47 +02:00
parent 4affb86489
commit 014fb5a99e
4 changed files with 14 additions and 25 deletions

View File

@ -44,7 +44,7 @@ echo "#############################################"
echo "######### INSTALL BASE & PYTHON3 PACKAGE ####" echo "######### INSTALL BASE & PYTHON3 PACKAGE ####"
echo "#############################################" 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 if [ $(dpkg-query -W -f='${Status}' $i 2>/dev/null | grep -c "ok installed") -eq 0 ]; then
echo ">>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Installation $i <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<" echo ">>><<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Installation $i <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<"
sudo apt install -y $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 [[ $? != 0 ]] && echo "INSTALL $i FAILED." && echo "python3 -m pip install -U $i FAILED." >> /tmp/install.errors.log && continue
done done
cat /tmp/install.errors.log
echo "#############################################" echo "#############################################"
echo "######### IMPRIMANTE & G1BILLET ##############" echo "######### IMPRIMANTE & G1BILLET ##############"
echo "#############################################" echo "#############################################"
########### QRCODE : G1VISA / G1BILLET : PRINTER ############## ########### QRCODE : G1VISA / G1BILLET : PRINTER ##############
if [[ $USER != 'xbian' ]]; then if [[ $USER != 'xbian' ]]; then
echo "INSTALL PRINTER FOR G1BILLET G1CARD G1VISA ? ENTER 'yes' or Hit enter to bypass." echo "INSTALL PRINTER FOR G1BILLET G1CARD G1VISA ..."
read saisie saisie="OK"
if [[ $saisie != "" ]]; then if [[ $saisie != "" ]]; then
## PRINT & FONTS ## PRINT & FONTS
sudo apt install ttf-mscorefonts-installer printer-driver-all cups -y sudo apt install ttf-mscorefonts-installer printer-driver-all cups -y
@ -180,10 +178,11 @@ echo "#############################################"
echo "######### SYSTEM SETUP #########################" echo "######### SYSTEM SETUP #########################"
echo "#############################################" echo "#############################################"
echo "=== SETUP IPFS SYSTEM" echo "=== SETUP IPFS"
~/.zen/Astroport.ONE/tools/ipfs_setup.sh ~/.zen/Astroport.ONE/tools/ipfs_setup.sh
echo "/ip4/127.0.0.1/tcp/5001" > ~/.ipfs/api echo "/ip4/127.0.0.1/tcp/5001" > ~/.ipfs/api
echo "=== SETUP ASTROPORT"
~/.zen/Astroport.ONE/setup.sh ~/.zen/Astroport.ONE/setup.sh
@ -201,10 +200,13 @@ echo "#############################################"
) & ) &
fi fi
echo "#############################################" echo "#############################################"
echo "### ANY ERRORS ?"
cat /tmp/install.errors.log
echo "#############################################" echo "#############################################"
echo "Astroport.ONE INSTALLATION FINISHED" echo "Astroport.ONE INSTALLATION FINISHED"
end=`date +%s` end=`date +%s`
echo Execution time was `expr $end - $start` seconds. echo Execution time was `expr $end - $start` seconds.
echo "#############################################" echo "#############################################"
echo "CREEZ VOTRE COMPTE SUR" echo "CREEZ VOTRE COMPTE SUR"
@ -216,6 +218,7 @@ echo "#############################################"
## ON BOARDING PLAYER ## ON BOARDING PLAYER
# ~/.zen/Astroport.ONE/start.sh # ~/.zen/Astroport.ONE/start.sh
espeak "Please create a player" espeak "Please create a player"
[[ $XDG_SESSION_TYPE == 'x11' ]] \ [[ $XDG_SESSION_TYPE == 'x11' ]] \
&& xdg-open "http://astroport.localhost:1234" \ && xdg-open "http://astroport.localhost:1234" \
|| ~/.zen/Astroport.ONE/command.sh || ~/.zen/Astroport.ONE/command.sh

View File

@ -101,7 +101,7 @@ ACTUAL=$(cat /etc/resolv.conf | grep -w nameserver | head -n 1)
if [[ $(echo $ACTUAL | grep "1.1.1.1") == "" ]] ; then 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 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 echo "127.0.1.1 $(hostname) $(hostname).local astroport astroport.local" >> /tmp/hosts
sudo cp /tmp/hosts /etc/hosts && rm /tmp/hosts sudo cp /tmp/hosts /etc/hosts && rm /tmp/hosts
fi fi
### ADD 20h12.sh CRON ############### ### ADD 20h12.sh CRON ###############
~/.zen/Astroport.ONE/tools/cron_VRFY.sh ON ~/.zen/Astroport.ONE/tools/cron_VRFY.sh ON
echo "#############################################" echo "#############################################"
## INSTALL yt-dlp & SYMLINK youtube-dl ## INSTALL yt-dlp & SYMLINK youtube-dl
~/.zen/Astroport.ONE/youtube-dl.sh ~/.zen/Astroport.ONE/youtube-dl.sh

View File

@ -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

View File

@ -78,7 +78,7 @@ User=_USER_
RestartSec=1 RestartSec=1
Restart=always Restart=always
Environment=IPFS_FD_MAX=8192 Environment=IPFS_FD_MAX=8192
ExecStart=/usr/local/bin/ipfs daemon --migrate ExecStart=/usr/local/bin/ipfs daemon --migrate --enable-namesys-pubsub
CPUAccounting=true CPUAccounting=true
CPUQuota=60% CPUQuota=60%