forked from axiom-team/astrXbian
63 lines
2.2 KiB
Bash
Executable File
63 lines
2.2 KiB
Bash
Executable File
#!/bin/bash
|
|
{
|
|
# Check requirements
|
|
echo "AstrXbian installer"
|
|
sudo apt update
|
|
sudo apt install git fail2ban inotify-tools curl net-tools libsodium23 libsodium-dev python3-dev python3-pip python3-setuptools python3-wheel mpack libssl-dev libffi-dev build-essential qrencode jq bc gawk -y
|
|
pip3 install cryptography Ed25519 base58 google protobuf
|
|
|
|
# git clone astrXbian
|
|
mkdir -p ~/.zen
|
|
cd ~/.zen
|
|
git clone https://git.p2p.legal/axiom-team/astrXbian.git
|
|
########################################################################
|
|
echo "Install .kodi default config"
|
|
cp -Rf ~/.zen/astrXbian/.install/.kodi ~/
|
|
########################################################################
|
|
echo "Install IPFS Swarm Layer"
|
|
~/.zen/astrXbian/.install/ipfs_alone.sh || exit 1
|
|
########################################################################
|
|
echo "Setup jaklis CG+ communication tool"
|
|
cd ~/.zen/astrXbian/zen/jaklis
|
|
./setup.sh
|
|
########################################################################
|
|
echo "Setup AstrXbian"
|
|
~/.zen/astrXbian/ISOconfig.sh
|
|
|
|
|
|
## fail2ban ERROR correction ##
|
|
#[....] Starting authentication failure monitor: fail2ban No file(s) found for glob /var/log/auth.log
|
|
# Failed during configuration: Have not found any log file for sshd jail
|
|
# failed!
|
|
sudo sed -i "s/auth.log/faillog/g" /etc/fail2ban/paths-common.conf
|
|
##
|
|
|
|
echo "enable 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
|
|
|
|
sudo ipfs restart
|
|
sudo fail2ban restart
|
|
|
|
### Install astrxbian & NGINX config
|
|
sudo rm -f /var/www/astrxbian
|
|
sudo cp -Rf /home/xbian/.zen/astrXbian/www/xbian /var/www/astrxbian
|
|
sudo cp -f /home/xbian/.zen/astrXbian/.install/templates/nginx/astrxbian.conf /etc/nginx/conf.d/
|
|
|
|
# TODO #######################################################################
|
|
# echo "Install JUKEBOOX"
|
|
# ~/.zen/astrXbian/.install/mpd_rompr.sh
|
|
|
|
sudo nginx restart
|
|
|
|
echo "Installation complete !!"
|
|
}
|
|
|
|
|