diff --git a/app/scripts/deploy.sh b/app/scripts/deploy.sh index d925afa..dfc3299 100755 --- a/app/scripts/deploy.sh +++ b/app/scripts/deploy.sh @@ -6,7 +6,6 @@ SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" ROOT_DIR="$SCRIPT_DIR/../.." # Run deploy + config with absolute paths -source "$ROOT_DIR/app/scripts/deploy.sh" source "$ROOT_DIR/app/scripts/config.sh" # Run remote install on the target diff --git a/app/scripts/install.sh b/app/scripts/install.sh index 37ee4d4..0840d10 100755 --- a/app/scripts/install.sh +++ b/app/scripts/install.sh @@ -17,16 +17,16 @@ if [ ! -x "$BUN_SYMLINK" ]; then sudo ln -sf "$BUN_REAL" "$BUN_SYMLINK" echo "Symlinked $BUN_REAL -> $BUN_SYMLINK" else - echo "Error: bun not found at $BUN_REAL" - exit 1 + echo ">> Installing bun at $BUN_REAL" + sudo apt install unzip + curl -fsSL https://bun.com/install | bash + sudo ln -sf "$BUN_REAL" "$BUN_SYMLINK" + echo "Symlinked $BUN_REAL -> $BUN_SYMLINK" fi else echo "bun already available at $BUN_SYMLINK" fi -echo ">> Clong git repository" -git clone $REPO $DEST - echo ">> Setting CAP_NET_BIND_SERVICE on $BUN_REAL" sudo setcap 'cap_net_bind_service=+ep' "$BUN_REAL" getcap "$BUN_REAL" || true diff --git a/app/scripts/remote-install.sh b/app/scripts/remote-install.sh index 7f1fd8b..5cfc48c 100755 --- a/app/scripts/remote-install.sh +++ b/app/scripts/remote-install.sh @@ -6,8 +6,7 @@ SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" ROOT_DIR="$SCRIPT_DIR/../.." # Run deploy + config with absolute paths -source "$ROOT_DIR/app/scripts/deploy.sh" source "$ROOT_DIR/app/scripts/config.sh" # Run remote install on the target -ssh "$HOST" "cd $DEST && ./app/scripts/install.sh && sudo systemctl start nose-pluto.service" +ssh "$HOST" "git clone $REPO $DEST && cd $DEST && ./app/scripts/install.sh && sudo systemctl start nose-pluto.service"