From 60797da108e4572425e1af4eda6ed8c1b7079395 Mon Sep 17 00:00:00 2001 From: pintoflager Date: Mon, 13 Feb 2023 18:37:55 -0500 Subject: [PATCH] Oh yeah and that thing --- dependency.toml | 2 +- executor/sh/install.sh | 21 +++++++++++++-------- package.toml | 2 +- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/dependency.toml b/dependency.toml index 20b56e9..56b7a25 100644 --- a/dependency.toml +++ b/dependency.toml @@ -6,5 +6,5 @@ [dependency.sh] optional = false -on_level = "Node" +on_level = "Node" # Node | Group | Project | Commander / Client collection = "Executor" \ No newline at end of file diff --git a/executor/sh/install.sh b/executor/sh/install.sh index 681ad9c..f934f01 100644 --- a/executor/sh/install.sh +++ b/executor/sh/install.sh @@ -1,23 +1,28 @@ #!/usr/bin/env sh -platform="$1" +role="$1" -# App installation tasks on commander node. Runs first -if [ "$platform" = 'commander' ]; then - carburator print terminal info "Executing install script on $platform" +# App installation tasks on a local client node. Runs first +if [ "$role" = 'client' ]; then + carburator print terminal info "Executing install script on $role" fi # App installation tasks on remote worker node. -if [ "$platform" = 'worker' ]; then - carburator print terminal info "Executing install script on $platform" +if [ "$role" = 'worker' ]; then + carburator print terminal info "Executing install script on $role" +fi + +# App installation tasks on remote commander node. +if [ "$role" = 'commander' ]; then + carburator print terminal info "Executing install script on $role" fi # Bash needs bash -if ! carburator fn integration-installed bash; then +if ! carburator has program bash; then carburator print terminal error \ "Missing required program bash. Please install it before proceeding." exit 120 fi # Just a reminder, to figure out where (any) script runs: -# if [[ $(carburator node platform) == 'commander' ]]; then ...... ; fi \ No newline at end of file +# if [[ $(carburator node role) == 'commander' ]]; then ...... ; fi \ No newline at end of file diff --git a/package.toml b/package.toml index 64ebbb4..333afb0 100644 --- a/package.toml +++ b/package.toml @@ -1,7 +1,7 @@ name = "bash" version = "0.1.0" collection = "Executor" -platforms = ["Commander", "Worker"] +platforms = ["Client", "Commander", "Worker"] retry_times = 3 retry_interval = 10 \ No newline at end of file