forked from axiom-team/astrXbian
[STY] Add "barry" (white) theme #1
|
@ -29,9 +29,7 @@ if [[ $(ps auxf --sort=+utime | grep -w ipfs | grep -v -E 'color=auto|grep' | ta
|
|||
exit 0
|
||||
fi
|
||||
|
||||
[[ -d ~/.ipfs ]] && echo "IPFS install exist! Please remove or backup before executing this script" && exit 0
|
||||
|
||||
echo -e "Astroport IPFS Layer installation..."
|
||||
echo -e "Astroport activate IPFS Layer installation..."
|
||||
|
||||
# CHECK node IP isLAN?
|
||||
myIP=$(hostname -I | awk '{print $1}')
|
||||
|
@ -39,39 +37,6 @@ isLAN=$(echo $myIP | grep -E "/(^127\.)|(^192\.168\.)|(^10\.)|(^172\.1[6-9]\.)|(
|
|||
|
||||
MACHINE_TYPE=`uname -m`
|
||||
|
||||
if [ ${MACHINE_TYPE} == 'x86_64' ]; then
|
||||
curl -s https://dist.ipfs.io/go-ipfs/v0.9.1/go-ipfs_v0.9.1_linux-amd64.tar.gz -o /tmp/go_ipfs.tar.gz # BIN
|
||||
curl -s https://dist.ipfs.io/ipfs-update/v1.6.0/ipfs-update_v1.6.0_linux-amd64.tar.gz -o $MY_PATH/ipfs-update.tar.gz # UPDATER
|
||||
elif [ ${MACHINE_TYPE:0:3} == 'arm' ]; then
|
||||
curl -s https://dist.ipfs.io/go-ipfs/v0.9.1/go-ipfs_v0.9.1_linux-arm.tar.gz -o /tmp/go_ipfs.tar.gz # BIN
|
||||
curl -s https://dist.ipfs.io/ipfs-update/v1.6.0/ipfs-update_v1.6.0_linux-arm.tar.gz -o $MY_PATH/ipfs-update.tar.gz # UPDATER
|
||||
elif [ ${MACHINE_TYPE} == 'aarch64' ]; then
|
||||
curl -s https://dist.ipfs.io/go-ipfs/v0.9.1/go-ipfs_v0.9.1_linux-arm64.tar.gz -o /tmp/go_ipfs.tar.gz # BIN
|
||||
else
|
||||
echo "Your $MACHINE_TYPE is not supported yet... Please add an issue." && exit 1
|
||||
fi
|
||||
|
||||
# UPDATER
|
||||
if [ -f $MY_PATH/ipfs-update.tar.gz ]; then
|
||||
echo "INSTALL ipfs-update >>>>>>>>>>>>>>>>>>>>>>>>>>"
|
||||
sudo tar -xvzf $MY_PATH/ipfs-update.tar.gz -C /usr/src/ || err "Untar ipfs-update"
|
||||
rm $MY_PATH/ipfs-update.tar.gz
|
||||
cd /usr/src/ipfs-update/
|
||||
sudo ./install.sh || err "Install ipfs-update"
|
||||
cd $MY_PATH
|
||||
|
||||
echo "INSTALL ipfs 0.9.1 >>>>>>>>>>>>>>>>>>>>>>>>>>"
|
||||
sudo ipfs-update install 0.9.1 || err "Install IPFS"
|
||||
fi
|
||||
if [ -f /tmp/go_ipfs.tar.gz ]; then
|
||||
## TERRAPI4 aarch64 install ipfs_aarch64_v0.9.1
|
||||
sudo tar -xvzf /tmp/go_ipfs.tar.gz -C /usr/src/ || err "Error Untar go_ipfs binaries"
|
||||
rm /tmp/go_ipfs.tar.gz
|
||||
cd /usr/src/go-ipfs/
|
||||
sudo ./install.sh || err "Install ipfs_aarch64"
|
||||
cd $MY_PATH
|
||||
fi
|
||||
|
||||
# INIT ipfs
|
||||
[[ $isLAN ]] && ipfs init -p lowpower \
|
||||
|| ipfs init -p server
|
||||
|
|
|
@ -12,7 +12,7 @@ ME="${0##*/}"
|
|||
|
||||
|
||||
########################################################################
|
||||
[[ ! $(which ipfs) ]] && echo "=== Vous devez avoir installé IPFS https://ipfs.io" && echo "Adaptez ce code à votre système ~/.zen/astrXbian/.install/ipfs_alone.sh" && exit 1
|
||||
[[ ! $(which ipfs) ]] && echo "=== Installez IPFS !!" && echo "https://docs.ipfs.io/install/command-line/#official-distributions" && exit 1
|
||||
|
||||
# MAIN # SI AUCUNE CLEF DE STATION...
|
||||
if [[ ! -f ~/.zen/secret.dunikey ]];
|
||||
|
@ -86,6 +86,10 @@ fi
|
|||
sudo ln -f -s /usr/bin/python3 /usr/bin/python
|
||||
|
||||
|
||||
## Scripts pour systemd ou InitV (xbian)
|
||||
echo "=== Activation SYSTEM IPFS"
|
||||
~/.zen/astrXbian/.install/ipfs_alone.sh
|
||||
|
||||
########################################################################
|
||||
echo "=== Clonage git CODE 'astrXbian' + 'Astroport.ONE' depuis https://git.p2p.legal"
|
||||
mkdir -p ~/.zen
|
||||
|
|
Loading…
Reference in New Issue