From 3c974f6dad7c73293936a306d62cbfeac611845b Mon Sep 17 00:00:00 2001 From: Yasin Kaya Date: Wed, 18 Nov 2020 11:09:09 -0800 Subject: [PATCH] changed all folder structure --- ppp_installer/install.sh => install.sh | 30 +++++++++++-------- ...all_ppp_jetson.sh => install_ppp_jetson.sh | 0 ...install_supersim.sh => install_supersim.sh | 0 ppp_installer/test.sh | 10 ------- {ppp_installer => src}/chat-connect | 0 {ppp_installer => src}/chat-disconnect | 0 {ppp_installer => src}/configs.sh | 0 {ppp_installer => src}/functions.sh | 0 {ppp_installer => src}/provider | 0 .../reconnect_scripts}/reconnect_basehat | 0 .../reconnect_scripts}/reconnect_baseshield | 0 .../reconnect_scripts}/reconnect_cellulariot | 0 .../reconnect_cellulariot_app | 0 .../reconnect_scripts}/reconnect_gprsshield | 0 .../reconnect_scripts}/reconnect_test.sh | 0 .../reconnect_scripts}/reconnect_tracker | 0 {ppp_installer => src}/reconnect_service | 0 17 files changed, 17 insertions(+), 23 deletions(-) rename ppp_installer/install.sh => install.sh (68%) rename ppp_installer/install_ppp_jetson.sh => install_ppp_jetson.sh (100%) rename ppp_installer/install_supersim.sh => install_supersim.sh (100%) delete mode 100644 ppp_installer/test.sh rename {ppp_installer => src}/chat-connect (100%) rename {ppp_installer => src}/chat-disconnect (100%) rename {ppp_installer => src}/configs.sh (100%) rename {ppp_installer => src}/functions.sh (100%) rename {ppp_installer => src}/provider (100%) rename {ppp_installer => src/reconnect_scripts}/reconnect_basehat (100%) rename {ppp_installer => src/reconnect_scripts}/reconnect_baseshield (100%) rename {ppp_installer => src/reconnect_scripts}/reconnect_cellulariot (100%) rename {ppp_installer => src/reconnect_scripts}/reconnect_cellulariot_app (100%) rename {ppp_installer => src/reconnect_scripts}/reconnect_gprsshield (100%) rename {ppp_installer => src/reconnect_scripts}/reconnect_test.sh (100%) rename {ppp_installer => src/reconnect_scripts}/reconnect_tracker (100%) rename {ppp_installer => src}/reconnect_service (100%) diff --git a/ppp_installer/install.sh b/install.sh similarity index 68% rename from ppp_installer/install.sh rename to install.sh index d0829dc..d50f712 100755 --- a/ppp_installer/install.sh +++ b/install.sh @@ -1,9 +1,13 @@ #!/bin/bash -REPO=revision SIXFAB_PATH="/opt/sixfab" PPP_PATH="/opt/sixfab/ppp_connection_manager" +REPO_PATH="https://raw.githubusercontent.com/sixfab/Sixfab_PPP_Installer" +BRANCH=revision +SOURCE_PATH="$REPO_PATH/$BRANCH/src" +SCRIPT_PATH="$REPO_PATH/$BRANCH/src/reconnect_scripts" + YELLOW='\033[1;33m' RED='\033[0;31m' BLUE='\033[1;34m' @@ -59,21 +63,21 @@ case $shield_hat in esac colored_echo "Downloading setup files..." -wget --no-check-certificate https://raw.githubusercontent.com/sixfab/Sixfab_PPP_Installer/$REPO/ppp_installer/chat-connect -O chat-connect +wget --no-check-certificate $SOURCE_PATH/chat-connect -O chat-connect if [ $? -ne 0 ]; then colored_echo "Download failed" ${RED} exit 1; fi -wget --no-check-certificate https://raw.githubusercontent.com/sixfab/Sixfab_PPP_Installer/$REPO/ppp_installer/chat-disconnect -O chat-disconnect +wget --no-check-certificate $SOURCE_PATH/chat-disconnect -O chat-disconnect if [ $? -ne 0 ]; then colored_echo "Download failed" ${RED} exit 1; fi -wget --no-check-certificate https://raw.githubusercontent.com/sixfab/Sixfab_PPP_Installer/$REPO/ppp_installer/provider -O provider +wget --no-check-certificate $SOURCE_PATH/provider -O provider if [ $? -ne 0 ]; then colored_echo "Download failed" ${RED} @@ -142,34 +146,34 @@ do case $auto_reconnect in [Yy]* ) colored_echo "Downloading setup file..." - wget --no-check-certificate https://raw.githubusercontent.com/sixfab/Sixfab_PPP_Installer/$REPO/ppp_installer/reconnect_service -O reconnect.service - wget --no-check-certificate https://raw.githubusercontent.com/sixfab/Sixfab_PPP_Installer/$REPO/ppp_installer/functions.sh - wget --no-check-certificate https://raw.githubusercontent.com/sixfab/Sixfab_PPP_Installer/$REPO/ppp_installer/configs.sh + wget --no-check-certificate $SOURCE_PATH/reconnect_service -O reconnect.service + wget --no-check-certificate $SOURCE_PATH/functions.sh + wget --no-check-certificate $SOURCE_PATH/configs.sh if [ $shield_hat -eq 1 ]; then - wget --no-check-certificate https://raw.githubusercontent.com/sixfab/Sixfab_PPP_Installer/$REPO/ppp_installer/reconnect_gprsshield -O reconnect.sh + wget --no-check-certificate $SCRIPT_PATH/reconnect_gprsshield -O reconnect.sh elif [ $shield_hat -eq 2 ]; then - wget --no-check-certificate https://raw.githubusercontent.com/sixfab/Sixfab_PPP_Installer/$REPO/ppp_installer/reconnect_baseshield -O reconnect.sh + wget --no-check-certificate $SCRIPT_PATH/reconnect_baseshield -O reconnect.sh elif [ $shield_hat -eq 3 ]; then - wget --no-check-certificate https://raw.githubusercontent.com/sixfab/Sixfab_PPP_Installer/$REPO/ppp_installer/reconnect_cellulariot_app -O reconnect.sh + wget --no-check-certificate $SCRIPT_PATH/reconnect_cellulariot_app -O reconnect.sh elif [ $shield_hat -eq 4 ]; then - wget --no-check-certificate https://raw.githubusercontent.com/sixfab/Sixfab_PPP_Installer/$REPO/ppp_installer/reconnect_cellulariot -O reconnect.sh + wget --no-check-certificate $SCRIPT_PATH/reconnect_cellulariot -O reconnect.sh elif [ $shield_hat -eq 5 ]; then - wget --no-check-certificate https://raw.githubusercontent.com/sixfab/Sixfab_PPP_Installer/$REPO/ppp_installer/reconnect_tracker -O reconnect.sh + wget --no-check-certificate $SCRIPT_PATH/reconnect_tracker -O reconnect.sh elif [ $shield_hat -eq 6 ]; then - wget --no-check-certificate https://raw.githubusercontent.com/sixfab/Sixfab_PPP_Installer/$REPO/ppp_installer/reconnect_basehat -O reconnect.sh + wget --no-check-certificate $SCRIPT_PATH/reconnect_basehat -O reconnect.sh fi diff --git a/ppp_installer/install_ppp_jetson.sh b/install_ppp_jetson.sh similarity index 100% rename from ppp_installer/install_ppp_jetson.sh rename to install_ppp_jetson.sh diff --git a/ppp_installer/install_supersim.sh b/install_supersim.sh similarity index 100% rename from ppp_installer/install_supersim.sh rename to install_supersim.sh diff --git a/ppp_installer/test.sh b/ppp_installer/test.sh deleted file mode 100644 index 22d4342..0000000 --- a/ppp_installer/test.sh +++ /dev/null @@ -1,10 +0,0 @@ -#!/bin/env bash - -source functions.sh -source configs.sh - -echo "PING TIMEOUT: " $PING_TIMEOUT -echo "DOUBLE CHECK WAIT: " $DOUBLE_CHECK_WAIT -echo "INTERVAL: " $INTERVAL - -check_network \ No newline at end of file diff --git a/ppp_installer/chat-connect b/src/chat-connect similarity index 100% rename from ppp_installer/chat-connect rename to src/chat-connect diff --git a/ppp_installer/chat-disconnect b/src/chat-disconnect similarity index 100% rename from ppp_installer/chat-disconnect rename to src/chat-disconnect diff --git a/ppp_installer/configs.sh b/src/configs.sh similarity index 100% rename from ppp_installer/configs.sh rename to src/configs.sh diff --git a/ppp_installer/functions.sh b/src/functions.sh similarity index 100% rename from ppp_installer/functions.sh rename to src/functions.sh diff --git a/ppp_installer/provider b/src/provider similarity index 100% rename from ppp_installer/provider rename to src/provider diff --git a/ppp_installer/reconnect_basehat b/src/reconnect_scripts/reconnect_basehat similarity index 100% rename from ppp_installer/reconnect_basehat rename to src/reconnect_scripts/reconnect_basehat diff --git a/ppp_installer/reconnect_baseshield b/src/reconnect_scripts/reconnect_baseshield similarity index 100% rename from ppp_installer/reconnect_baseshield rename to src/reconnect_scripts/reconnect_baseshield diff --git a/ppp_installer/reconnect_cellulariot b/src/reconnect_scripts/reconnect_cellulariot similarity index 100% rename from ppp_installer/reconnect_cellulariot rename to src/reconnect_scripts/reconnect_cellulariot diff --git a/ppp_installer/reconnect_cellulariot_app b/src/reconnect_scripts/reconnect_cellulariot_app similarity index 100% rename from ppp_installer/reconnect_cellulariot_app rename to src/reconnect_scripts/reconnect_cellulariot_app diff --git a/ppp_installer/reconnect_gprsshield b/src/reconnect_scripts/reconnect_gprsshield similarity index 100% rename from ppp_installer/reconnect_gprsshield rename to src/reconnect_scripts/reconnect_gprsshield diff --git a/ppp_installer/reconnect_test.sh b/src/reconnect_scripts/reconnect_test.sh similarity index 100% rename from ppp_installer/reconnect_test.sh rename to src/reconnect_scripts/reconnect_test.sh diff --git a/ppp_installer/reconnect_tracker b/src/reconnect_scripts/reconnect_tracker similarity index 100% rename from ppp_installer/reconnect_tracker rename to src/reconnect_scripts/reconnect_tracker diff --git a/ppp_installer/reconnect_service b/src/reconnect_service similarity index 100% rename from ppp_installer/reconnect_service rename to src/reconnect_service