From 22bf21a6d77342441bcb08d0f9f094278d07a93b Mon Sep 17 00:00:00 2001 From: qo-op Date: Thu, 30 Apr 2020 01:39:27 +0200 Subject: [PATCH] install --- .install/ipfs.sh | 7 +++---- install.sh | 6 +++++- 2 files changed, 8 insertions(+), 5 deletions(-) diff --git a/.install/ipfs.sh b/.install/ipfs.sh index 19711ba..b2e5d2e 100755 --- a/.install/ipfs.sh +++ b/.install/ipfs.sh @@ -14,8 +14,7 @@ if [ "$EUID" -eq 0 ] else echo -e "${c_yellow}OK $USER, let's go!$c_"; fi -[[ -d ~/.ipfs-old/ ]] && echo "Backup exist, please remove backup before execute this script" && exit 1 -[[ -d ~/.ipfs/ ]] && rm -rf ~/.ipfs-old && mv ~/.ipfs/ ~/.ipfs-old +[[ -d ~/.ipfs ]] && echo "IPFS install exist, please remove backup before execute this script" && exit 1 ipfs_install() { echo -e "${c_yellow}Onboarding IPFS...$c_" @@ -35,7 +34,7 @@ ipfs_install() { echo "INSTALL latest ipfs" sudo ipfs-update install latest || err+="Install IPFS" - fi + if [[ ! -f /etc/systemd/system/ipfs.service ]]; then echo "CREATE SYSTEMD ipfs SERVICE" @@ -46,7 +45,7 @@ ipfs_install() { [[ -f /etc/systemd/system/ipfs.service ]] && sudo rm /etc/systemd/system/ipfs.service sudo cp -f $templates/ipfs.service /etc/systemd/system/ sudo sed -i "s/_USER/$USER/g" /etc/systemd/system/ipfs.service - + fi sudo systemctl daemon-reload || err+="Restart IPFS" sudo systemctl enable ipfs || err+="Enable IPFS daemon" diff --git a/install.sh b/install.sh index 186d818..8d8cd54 100755 --- a/install.sh +++ b/install.sh @@ -51,6 +51,10 @@ $MY_PATH/.install/export_colors.sh # -------------------------------------------- +# Install IPFS +ipfs() { + source .install/ipfs.sh +} # Install ScuttleButt source .install/scuttlebutt.sh @@ -60,7 +64,7 @@ iptubes() { } # Install Torrengo - source iptubes/install.sh torrengo +# source iptubes/install.sh torrengo # --------------------------