astrXbian/install.sh

112 lines
4.2 KiB
Bash
Raw Normal View History

2020-12-12 01:26:39 +01:00
#!/bin/bash
2021-01-31 22:51:25 +01:00
########################################################################
# Version: 0.2
# License: AGPL-3.0 (https://choosealicense.com/licenses/agpl-3.0/)
########################################################################
2020-12-12 01:26:39 +01:00
{
2021-01-31 22:51:25 +01:00
[ $(id -u) -eq 0 ] && echo "LANCEMENT root INTERDIT. Utilisez un simple utilisateur du groupe \"sudo\" SVP" && exit 1
2021-02-19 15:51:10 +01:00
if [[ ! -f ~/.zen/secret.june ]];
then
2021-01-31 22:51:25 +01:00
2020-12-12 01:26:39 +01:00
# Check requirements
2021-01-31 22:51:25 +01:00
echo "AstrXbian installateur pour https://xbian.org et autres ditributions basées sur DEBIAN"
2020-12-18 02:55:21 +01:00
sudo apt-get update
2021-01-31 22:51:25 +01:00
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
2021-03-03 19:10:20 +01:00
sudo apt-get install build-essential qrencode jq bc gawk ffmpeg sqlite dnsutils vlc mp3info -y
2021-02-03 02:05:20 +01:00
[[ ! $(which kodi) ]] && sudo apt-get install kodi -y
2021-02-15 10:49:29 +01:00
[[ "$USER" != "xbian" ]] && sudo apt-get install x11-utils zenity handbrake-gtk -y
# [[ ! $(which apache2) ]] && sudo apt-get install mariadb-server nginx python3-certbot-nginx certbot 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
2021-01-31 22:51:25 +01:00
pip3 install cryptography Ed25519 base58 google protobuf duniterpy
2020-12-12 01:26:39 +01:00
2021-02-18 15:30:51 +01:00
2021-01-31 22:51:25 +01:00
########################################################################
echo "Clonage git astrXbian depuis https://git.p2p.legal"
2020-12-14 00:32:04 +01:00
mkdir -p ~/.zen
2020-12-13 20:47:09 +01:00
cd ~/.zen
git clone https://git.p2p.legal/axiom-team/astrXbian.git
2021-01-31 22:51:25 +01:00
2020-12-14 00:13:39 +01:00
########################################################################
2021-01-31 22:51:25 +01:00
echo "Configuration ASTROPORT de ~/.kodi"
2020-12-14 00:13:39 +01:00
cp -Rf ~/.zen/astrXbian/.install/.kodi ~/
2021-01-31 22:51:25 +01:00
2020-12-14 00:13:39 +01:00
########################################################################
2021-01-31 22:51:25 +01:00
echo "Installation de IPFS https://ipfs.io"
~/.zen/astrXbian/.install/ipfs_alone.sh
2020-12-14 00:13:39 +01:00
########################################################################
2021-01-31 22:51:25 +01:00
echo "Configuration des communications avec GCHANGE+"
2020-12-13 20:23:50 +01:00
cd ~/.zen/astrXbian/zen/jaklis
./setup.sh
2021-01-31 22:51:25 +01:00
########################################################################
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
2021-01-31 22:51:25 +01:00
[[ "$USER" == "xbian" ]] && sudo sed -i "s/auth.log/faillog/g" /etc/fail2ban/paths-common.conf
2021-01-31 22:51:25 +01:00
### MODIFIYING /etc/sudoers ###
# DEFCON LEVEL < 5
# echo "$USER ALL=(ALL) NOPASSWD:ALL" | sudo EDITOR='tee -a' visudo
2021-01-31 22:51:25 +01:00
# NODE activates fail2ban IN zen/ipfs_SWARM_refresh.sh
2020-12-13 20:23:50 +01:00
2021-01-31 16:47:27 +01:00
if [[ "$USER" == "xbian" ]]
then
2021-01-31 22:51:25 +01:00
echo "enabling ipfs initV service autostart"
2021-01-31 16:47:27 +01:00
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
2021-01-31 22:51:25 +01:00
########################################################################
echo "Configuration ASTROPORT/KODI"
~/.zen/astrXbian/ISOconfig.sh
echo "Redémarrage des services..."
2021-01-31 16:47:27 +01:00
sudo service ipfs restart
sudo service fail2ban restart
2020-12-12 01:26:39 +01:00
# CREATE ~/astroport FILE GATE
mkdir -p ~/astroport/film
mkdir -p ~/astroport/serie
mkdir -p ~/astroport/anime
2021-02-19 15:51:10 +01:00
fi
2021-02-16 22:50:38 +01:00
echo "Installation complete !!
2021-02-16 22:50:38 +01:00
==================================================
BIENVENUE DANS le service ASTROPORT/KODI/VSTREAM
==================================================
1. Connectez-vous sur https://gchange.fr avec vos identifiants
2020-12-13 20:42:15 +01:00
$(cat ~/.zen/secret.june)
2020-12-13 20:42:15 +01:00
2021-02-18 12:27:33 +01:00
2. Rejoignez-y vos amis, et échangez des étoiles avec eux pour créer vos cercles de liaisons amicales.
2021-01-31 22:51:25 +01:00
2021-02-18 12:27:33 +01:00
3. Ajoutez vos vidéos avec le lien Astroport/Kodi sur votre bureau
2021-01-31 22:51:25 +01:00
==========================================================
2021-02-18 00:39:21 +01:00
Maintenant, redémarrez votre ordinateur pour rejoindre ASTROPORT
2021-02-16 22:52:51 +01:00
==========================================================
2021-02-18 12:27:33 +01:00
GCHANGE (Firefox)
https://github.com/duniter-gchange/gchange-client/releases/download/v1.2.7/gchange-v1.2.7-extension-firefox.xpi
Vos identifiants sont dans dans ~/.zen/secret.june
CESIUM (Firefox)
https://github.com/duniter/cesium/releases/download/v1.6.7/cesium-v1.6.7-extension-firefox.xpi
Utilisez ~/.zen/secret.duniter pour accéder à votre portefeuille
---
2021-02-16 22:52:51 +01:00
Rendons le monde numérique LIBRE P2P et LEGAL
[REC] Team : https://copylaradio.com
2021-01-31 22:51:25 +01:00
"
}