diff --git a/README.md b/README.md index 0c81936..c469849 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ **usage** - zsh <(curl -s https://git.service.wiseadvice.eu/wiseadvice_public_repos/wa_public_init_repo/raw/branch/main/init.sh) +#zsh <(curl -sk http://git.service.wiseadvice.eu:3000/wiseadvice_public_repos/wa_public_init_repo/raw/branch/main/init.sh) + +curl -sk http://git.service.wiseadvice.eu:3000/wiseadvice_public_repos/wa_public_init_repo/raw/branch/main/init.sh | zsh \ No newline at end of file diff --git a/init.sh b/init.sh index 4a2b254..2d9ff26 100755 --- a/init.sh +++ b/init.sh @@ -106,20 +106,22 @@ fi -if [ ! -f $WA_REPO/node_type.sh ]; then +if [ -f $WA_REPO/node_type.sh ]; then + source $WA_REPO/node_type.sh +else echo " " echo -n "init as master? type yes: " read -r init_as_master if [ "$init_as_master" == "yes" ]; then - echo "export NODE_TYPE=master" > $WA_REPO/node_type.sh + echo -n "export NODE_TYPE=master" > $WA_REPO/node_type.sh + NODE_TYPE=master else - echo "export NODE_TYPE=worker" > $WA_REPO/node_type.sh + echo -n "export NODE_TYPE=worker" > $WA_REPO/node_type.sh + NODE_TYPE=worker fi fi -source $WA_REPO/node_type.sh - echo " " echo -n "ready to set-up K8s? type yes: "