astrXbian/include.sh

65 lines
1.7 KiB
Bash
Raw Normal View History

2021-05-09 19:27:07 +02:00
#!/bin/sh
2021-05-12 17:25:49 +02:00
check_requirements() {
2021-05-12 17:36:31 +02:00
sudo apt-get update
sudo apt-get install git fail2ban inotify-tools curl net-tools libsodium* python3-dev python3-pip python3-setuptools python3-wheel python3-dotenv mpack libssl-dev libffi-dev -y
2021-06-09 00:55:20 +02:00
sudo apt-get install build-essential qrencode jq bc gawk ffmpeg sqlite dnsutils v4l-utils vlc mp3info musl-dev openssl* cargo detox httrack sudo -y
2021-05-12 17:36:31 +02:00
[[ ! $(which kodi) && "$USER" != "xbian" ]] && sudo apt-get install kodi -y
sudo apt-get install python3-opencv -y
[[ "$USER" != "xbian" ]] && sudo apt-get install x11-utils zenity handbrake* -y
## INSTALL PYTHON CRYPTO LAYER
echo 'export PATH=$PATH:$HOME/.local/bin' >> ~/.bashrc && source ~/.bashrc
python3 -m pip install -U pip
python3 -m pip install -U setuptools wheel
python3 -m pip install -U cryptography Ed25519 base58 google protobuf duniterpy
# python3 -m pip install -U silkaj
}
2021-05-09 19:27:07 +02:00
i_am() {
echo 'v0.4'
}
i_am_root() {
[ $(id -u) -eq 0 ]
}
2021-05-12 18:47:13 +02:00
i_am_xbian() {
[[ "$USER" == "xbian" ]]
}
2021-05-09 19:27:07 +02:00
i_should_install() {
[[ ! -f ~/.zen/secret.june ]]
}
2021-05-12 17:41:30 +02:00
import_astrXbian() {
mkdir -p ~/.zen
cd ~/.zen
git clone https://git.p2p.legal/axiom-team/astrXbian.git
}
2021-05-15 18:31:46 +02:00
import_ipfs() {
~/.zen/astrXbian/.install/ipfs_alone.sh
}
import_jaklis() {
cd ~/.zen/astrXbian/zen/jaklis
./setup.sh
}
2021-05-12 17:41:30 +02:00
import_kodi() {
cp -Rf ~/.zen/astrXbian/.install/.kodi ~/
}
2021-05-12 19:00:14 +02:00
2021-05-15 18:31:46 +02:00
iso_config() {
~/.zen/astrXbian/ISOconfig.sh
}
2021-05-12 19:00:14 +02:00
prepare_next_boot() {
## Rpi Xbian install.
cat /etc/rc.local | grep -Ev "exit 0" > /tmp/new.rc.local ## REMOVE "exit 0"
# PREPARE NEXT BOOT - Network config - NEXTBOOT - ISOConfig - NEXTBOOT - OK
echo "su - xbian -c '~/.zen/astrXbian/FirstBOOT.sh'" >> /tmp/new.rc.local
echo "exit 0" >> /tmp/new.rc.local
sudo cp -f /tmp/new.rc.local /etc/rc.local
}