#!/bin/bash ######################################################################## # Version: 0.2 # License: AGPL-3.0 (https://choosealicense.com/licenses/agpl-3.0/) ######################################################################## { [ $(id -u) -eq 0 ] && echo "LANCEMENT root INTERDIT. Utilisez un simple utilisateur du groupe \"sudo\" SVP" && exit 1 # Check requirements echo "AstrXbian installateur pour https://xbian.org et autres ditributions basées sur DEBIAN" sudo apt-get update sudo apt-get install git fail2ban inotify-tools curl net-tools libsodium* python3-dev python3-pip python3-setuptools python3-wheel mpack libssl-dev libffi-dev -y sudo apt-get install build-essential qrencode jq bc gawk ffmpeg sqlite dnsutils -y [[ ! $(which kodi) ]] && sudo apt-get install kodi -y [[ ! $(which apache2) ]] && sudo apt-get install mariadb-server nginx ssl-cert php-imap php-cli php-curl php-sqlite3 php-gd php-json php-xml php-mbstring php-gettext php-mysql php-fpm -y pip3 install cryptography Ed25519 base58 google protobuf duniterpy ######################################################################## echo "Clonage git astrXbian depuis https://git.p2p.legal" mkdir -p ~/.zen cd ~/.zen git clone https://git.p2p.legal/axiom-team/astrXbian.git ######################################################################## echo "Configuration ASTROPORT de ~/.kodi" cp -Rf ~/.zen/astrXbian/.install/.kodi ~/ ######################################################################## echo "Installation de IPFS https://ipfs.io" ~/.zen/astrXbian/.install/ipfs_alone.sh ######################################################################## echo "Configuration des communications avec GCHANGE+" cd ~/.zen/astrXbian/zen/jaklis ./setup.sh ######################################################################## echo "Sécurisation DEFCON SUDOERS FAIL2BAN" ## XBIAN fail2ban ERROR correction ## #[....] Starting authentication failure monitor: fail2ban No file(s) found for glob /var/log/auth.log [[ "$USER" == "xbian" ]] && sudo sed -i "s/auth.log/faillog/g" /etc/fail2ban/paths-common.conf ### MODIFIYING /etc/sudoers ### # DEFCON LEVEL < 5 # echo "$USER ALL=(ALL) NOPASSWD:ALL" | sudo EDITOR='tee -a' visudo # NODE activates fail2ban IN zen/ipfs_SWARM_refresh.sh if [[ "$USER" == "xbian" ]] then echo "enabling ipfs initV service autostart" cd /etc/rc2.d && sudo ln -s ../init.d/ipfs S02ipfs cd /etc/rc3.d && sudo ln -s ../init.d/ipfs S02ipfs cd /etc/rc4.d && sudo ln -s ../init.d/ipfs S02ipfs cd /etc/rc5.d && sudo ln -s ../init.d/ipfs S02ipfs cd /etc/rc0.d && sudo ln -s ../init.d/ipfs K01ipfs cd /etc/rc1.d && sudo ln -s ../init.d/ipfs K01ipfs cd /etc/rc6.d && sudo ln -s ../init.d/ipfs K01ipfs fi ######################################################################## echo "Configuration ASTROPORT/KODI" ~/.zen/astrXbian/ISOconfig.sh echo "Redémarrage des services..." sudo service ipfs restart sudo service fail2ban restart echo "Installation complete !! ============================= BIENVENUE DANS ASTROPORT/KODI ============================= Connectez-vous sur https://gchange.fr avec vos identifiants $(cat ~/.zen/secret.june) Retrouvez-y vos amis, et échangez des étoiles avec eux. Ajoutez vos vidéos avec ~/zen/astrXbian/ajouter_video.sh ________________________________________________________________________ Ajustez votre niveau de sécurité? DEFCON LEVEL $(cat ~/.zen/astrXbian/DEFCON) \"$USER ALL=(ALL) NOPASSWD:/usr/bin/fail2ban-client\" dans /etc/sudoers ~/.zen/astrXbian/DEFCON Participez à rendre le monde plus LIBRE, P2P et LEGAL Retrouvez-nous sur https://copylaradio.com Redemarrez l'ordinateur: sudo reboot " }