Update main install
This commit is contained in:
parent
2a61947521
commit
ec8586cc8f
|
@ -22,10 +22,6 @@ if [ "$EUID" -eq 0 ]
|
||||||
else echo -e "${c_yellow}OK $USER, let's go!$c_";
|
else echo -e "${c_yellow}OK $USER, let's go!$c_";
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Check requierments
|
|
||||||
sudo apt update
|
|
||||||
sudo apt install curl net-tools -y
|
|
||||||
|
|
||||||
[[ -d ~/.ipfs ]] && echo "IPFS install exist, please remove backup before execute this script" && exit 1
|
[[ -d ~/.ipfs ]] && echo "IPFS install exist, please remove backup before execute this script" && exit 1
|
||||||
|
|
||||||
echo -e "${c_yellow}Onboarding IPFS...$c_"
|
echo -e "${c_yellow}Onboarding IPFS...$c_"
|
||||||
|
@ -75,4 +71,9 @@ ipfs bootstrap add /ip4/51.15.166.54/tcp/4001/p2p/Qmb6Gyy3KFWTxWh4v6fBeh5ANxAF6Y
|
||||||
ipfs bootstrap add /ip6/fd42:feed:feed:feed::1/tcp/4001/p2p/Qmb6Gyy3KFWTxWh4v6fBeh5ANxAF6YAahWQtokmsNsqGda
|
ipfs bootstrap add /ip6/fd42:feed:feed:feed::1/tcp/4001/p2p/Qmb6Gyy3KFWTxWh4v6fBeh5ANxAF6YAahWQtokmsNsqGda
|
||||||
|
|
||||||
sudo systemctl restart ipfs || err+="Restart IPFS daemon"
|
sudo systemctl restart ipfs || err+="Restart IPFS daemon"
|
||||||
|
|
||||||
|
[[ ! $(ipfs swarm peers) ]] && echo "${c_red}No peers found in swarm. Please open issue :https://git.p2p.legal/axiom-team/astroport/issues" && exit 1
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
} # this ensures the entire script is downloaded #
|
} # this ensures the entire script is downloaded #
|
||||||
|
|
|
@ -1,102 +1,18 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
################################################################################
|
|
||||||
# Author: Poka (poka@p2p.legal)
|
|
||||||
# Author: Fred (support@qo-op.com)
|
|
||||||
# Version: 0.2.0
|
|
||||||
# License: AGPL-3.0 (https://choosealicense.com/licenses/agpl-3.0/)
|
|
||||||
# Git: https://git.p2p.legal/axiom-team/astroport
|
|
||||||
################################################################################
|
|
||||||
|
|
||||||
## Check if root user
|
# Check requierments
|
||||||
if [ "$EUID" -eq 0 ]
|
sudo apt update
|
||||||
then echo -e "${c_red}Please do not execute this script in root user.$c_"
|
sudo apt install curl net-tools -y
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
source ./git-update.sh
|
echo "${c_green}Astroport installer
|
||||||
|
###
|
||||||
|
1. IPFS Swarm Layer$c_"
|
||||||
|
# Full automatic (you trust this git depot)
|
||||||
|
curl -s https://git.p2p.legal/axiom-team/astroport/raw/master/.install/ipfs_alone.sh | bash || exit 1
|
||||||
|
|
||||||
echo -e "Installing Astroport"
|
echo "${c_green}2. Ḡ1/ScuttleButt anoptical layer$c_"
|
||||||
|
# ONCE YOU READ and AGREE. Run TrustFull QUICK Install !!
|
||||||
MY_PATH="`dirname \"$0\"`"
|
curl -s https://git.p2p.legal/axiom-team/astroport/raw/master/zen/tools/make_G1SSB_secret.sh | bash || exit 1
|
||||||
MY_PATH="`( cd \"$MY_PATH\" && pwd )`"
|
|
||||||
now=$(date +%Y-%m-%d)
|
|
||||||
unset apps
|
|
||||||
errors=0
|
|
||||||
|
|
||||||
## Get profile
|
|
||||||
[[ -f $MY_PATH/.profile ]] && source $MY_PATH/.profile || touch $MY_PATH/.profile
|
|
||||||
|
|
||||||
help() {
|
|
||||||
clear
|
|
||||||
echo -e "${c_light}Welcome onboard !$c_
|
|
||||||
- No arguments yet
|
|
||||||
"
|
|
||||||
exit 0
|
|
||||||
}
|
|
||||||
|
|
||||||
## Get arguments
|
|
||||||
args="$@"
|
|
||||||
apps=$(echo "$@" | tr " " ",")
|
|
||||||
|
|
||||||
## Vérifie le type de système
|
|
||||||
[[ $(uname -a | grep arm) ]] && ARM=yes || unset isARM
|
|
||||||
if [[ $(grep -E 'stretch|18.|19.' /etc/os-release) ]]; then OS=stretch;
|
|
||||||
elif [[ $(grep buster /etc/os-release) ]]; then OS=buster;
|
|
||||||
else echo "${c_red}Your OS is not supported$c_"; exit 1; fi
|
|
||||||
sed -i 's/_OS/$OS/g' $MY_PATH/.profile
|
|
||||||
sed -i 's/_ARM/$ARM/g' $MY_PATH/.profile
|
|
||||||
sed -i 's/_GPATH/$MY_PATH/g' $MY_PATH/.profile
|
|
||||||
|
|
||||||
chmod u+x $MY_PATH/.install/*.sh
|
|
||||||
$MY_PATH/.install/export_colors.sh
|
|
||||||
[[ -f ~/.bash_aliases ]] && source ~/.bash_aliases # POKA ?
|
|
||||||
|
|
||||||
# --------------------------------------------
|
|
||||||
|
|
||||||
# Install IPFS
|
|
||||||
ipfs() {
|
|
||||||
source .install/ipfs_alone.sh
|
|
||||||
}
|
|
||||||
# Install ScuttleButt
|
|
||||||
source .install/scuttlebutt.sh
|
|
||||||
|
|
||||||
# Install iptubes
|
|
||||||
iptubes() {
|
|
||||||
source iptubes/install.sh
|
|
||||||
}
|
|
||||||
|
|
||||||
# Install Torrengo
|
|
||||||
# source iptubes/install.sh torrengo
|
|
||||||
|
|
||||||
# --------------------------
|
|
||||||
|
|
||||||
# Check installs
|
|
||||||
functions=$(declare -F | awk '{print $NF}' | sort | egrep -v "^_" )
|
|
||||||
|
|
||||||
echo -e "${c_green}Astroport UP$c_"
|
|
||||||
[[ -z $args ]] && echo -e "Select a gate to install:" && read apps
|
|
||||||
[[ -z $apps ]] && echo -e "${c_red}Unknown gate \"$args\"$c_" && exit 1
|
|
||||||
|
|
||||||
while read gate; do
|
|
||||||
if [[ "$functions" == *"$gate"* ]]; then
|
|
||||||
echo -e "${c_yellow}Installing gate $gate ...$c_"
|
|
||||||
$gate
|
|
||||||
else
|
|
||||||
errors="${c_red}Unknown gate \"$gate\"$c_"
|
|
||||||
fi
|
|
||||||
done <<<$(echo "$apps" | sed -n 1'p' | tr ',' '\n')
|
|
||||||
|
|
||||||
## CREATE G1SSB account
|
|
||||||
$PATH/zen/tools/make_G1SSB_secret.sh
|
|
||||||
|
|
||||||
## Run init scipts
|
|
||||||
$PATH/zen/ssb_IPFS_swarm.sh
|
|
||||||
$PATH/zen/cron_VRFY.sh
|
|
||||||
|
|
||||||
if [[ $errors == 0 ]]; then
|
|
||||||
echo -e "${c_green}Good trip !$c_"
|
|
||||||
else
|
|
||||||
echo -e "${c_red}An error has occurred:$c_ \n- $errors"
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
echo "${c_green}Installation complete$c_"
|
||||||
exit 0
|
exit 0
|
||||||
|
|
|
@ -0,0 +1,102 @@
|
||||||
|
#!/bin/bash
|
||||||
|
################################################################################
|
||||||
|
# Author: Poka (poka@p2p.legal)
|
||||||
|
# Author: Fred (support@qo-op.com)
|
||||||
|
# Version: 0.3.0
|
||||||
|
# License: AGPL-3.0 (https://choosealicense.com/licenses/agpl-3.0/)
|
||||||
|
# Git: https://git.p2p.legal/axiom-team/astroport
|
||||||
|
################################################################################
|
||||||
|
|
||||||
|
## Check if root user
|
||||||
|
if [ "$EUID" -eq 0 ]
|
||||||
|
then echo -e "${c_red}Please do not execute this script in root user.$c_"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
source ./git-update.sh
|
||||||
|
|
||||||
|
echo -e "Installing Astroport"
|
||||||
|
|
||||||
|
MY_PATH="`dirname \"$0\"`"
|
||||||
|
MY_PATH="`( cd \"$MY_PATH\" && pwd )`"
|
||||||
|
now=$(date +%Y-%m-%d)
|
||||||
|
unset apps
|
||||||
|
errors=0
|
||||||
|
|
||||||
|
## Get profile
|
||||||
|
[[ -f $MY_PATH/.profile ]] && source $MY_PATH/.profile || touch $MY_PATH/.profile
|
||||||
|
|
||||||
|
help() {
|
||||||
|
clear
|
||||||
|
echo -e "${c_light}Welcome onboard !$c_
|
||||||
|
- No arguments yet
|
||||||
|
"
|
||||||
|
exit 0
|
||||||
|
}
|
||||||
|
|
||||||
|
## Get arguments
|
||||||
|
args="$@"
|
||||||
|
apps=$(echo "$@" | tr " " ",")
|
||||||
|
|
||||||
|
## Vérifie le type de système
|
||||||
|
[[ $(uname -a | grep arm) ]] && ARM=yes || unset isARM
|
||||||
|
if [[ $(grep -E 'stretch|18.|19.' /etc/os-release) ]]; then OS=stretch;
|
||||||
|
elif [[ $(grep buster /etc/os-release) ]]; then OS=buster;
|
||||||
|
else echo "${c_red}Your OS is not supported$c_"; exit 1; fi
|
||||||
|
sed -i 's/_OS/$OS/g' $MY_PATH/.profile
|
||||||
|
sed -i 's/_ARM/$ARM/g' $MY_PATH/.profile
|
||||||
|
sed -i 's/_GPATH/$MY_PATH/g' $MY_PATH/.profile
|
||||||
|
|
||||||
|
chmod u+x $MY_PATH/.install/*.sh
|
||||||
|
$MY_PATH/.install/export_colors.sh
|
||||||
|
[[ -f ~/.bash_aliases ]] && source ~/.bash_aliases # POKA ?
|
||||||
|
|
||||||
|
# --------------------------------------------
|
||||||
|
|
||||||
|
# Install IPFS
|
||||||
|
ipfs() {
|
||||||
|
source .install/ipfs_alone.sh
|
||||||
|
}
|
||||||
|
# Install ScuttleButt
|
||||||
|
source .install/scuttlebutt.sh
|
||||||
|
|
||||||
|
# Install iptubes
|
||||||
|
iptubes() {
|
||||||
|
source iptubes/install.sh
|
||||||
|
}
|
||||||
|
|
||||||
|
# Install Torrengo
|
||||||
|
# source iptubes/install.sh torrengo
|
||||||
|
|
||||||
|
# --------------------------
|
||||||
|
|
||||||
|
# Check installs
|
||||||
|
functions=$(declare -F | awk '{print $NF}' | sort | egrep -v "^_" )
|
||||||
|
|
||||||
|
echo -e "${c_green}Astroport UP$c_"
|
||||||
|
[[ -z $args ]] && echo -e "Select a gate to install:" && read apps
|
||||||
|
[[ -z $apps ]] && echo -e "${c_red}Unknown gate \"$args\"$c_" && exit 1
|
||||||
|
|
||||||
|
while read gate; do
|
||||||
|
if [[ "$functions" == *"$gate"* ]]; then
|
||||||
|
echo -e "${c_yellow}Installing gate $gate ...$c_"
|
||||||
|
$gate
|
||||||
|
else
|
||||||
|
errors="${c_red}Unknown gate \"$gate\"$c_"
|
||||||
|
fi
|
||||||
|
done <<<$(echo "$apps" | sed -n 1'p' | tr ',' '\n')
|
||||||
|
|
||||||
|
## CREATE G1SSB account
|
||||||
|
$PATH/zen/tools/make_G1SSB_secret.sh
|
||||||
|
|
||||||
|
## Run init scipts
|
||||||
|
$PATH/zen/ssb_IPFS_swarm.sh
|
||||||
|
$PATH/zen/cron_VRFY.sh
|
||||||
|
|
||||||
|
if [[ $errors == 0 ]]; then
|
||||||
|
echo -e "${c_green}Good trip !$c_"
|
||||||
|
else
|
||||||
|
echo -e "${c_red}An error has occurred:$c_ \n- $errors"
|
||||||
|
fi
|
||||||
|
|
||||||
|
exit 0
|
Loading…
Reference in New Issue