-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added many improvements and some helper functions
- Loading branch information
1 parent
b327c16
commit 13157ec
Showing
11 changed files
with
120 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#! /bin/bash | ||
SCRIPT_DIR=$(realpath "$(dirname "$0")") | ||
source $SCRIPT_DIR/node.sh attach blueberry |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
|
||
# Get the directory of the current script | ||
SCRIPT_DIR=$(dirname "$(realpath "$0")") | ||
source $SCRIPT_DIR/utils.sh | ||
|
||
# Add a cron job that runs the start.sh script at startup | ||
print_step "Adding cron job" | ||
if ! check_command "crontab"; then | ||
print_error "Failed to add cron job." | ||
else | ||
(crontab -l 2>/dev/null; echo "@reboot $SCRIPT_DIR/start.sh") | crontab - | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
#! /bin/bash | ||
SCRIPT_DIR=$(realpath "$(dirname "$0")") | ||
COMMAND=$1 | ||
NODE_NAME=$2 | ||
|
||
source $SCRIPT_DIR/utils.sh | ||
|
||
print_header "$COMMAND the vantage6-node" | ||
print_step "Checking if conda is installed" | ||
if ! check_command "conda"; then | ||
print_error "Did you run the installation script? Exiting..." | ||
exit 1 | ||
fi | ||
|
||
print_step "Checking if the vantage6 environment exists" | ||
if ! check_env "vantage6"; then | ||
print_error "Did you run the installation script? Exiting..." | ||
exit 1 | ||
fi | ||
|
||
print_step "Activating the vantage6 environment" | ||
source $HOME/miniconda/etc/profile.d/conda.sh | ||
conda activate vantage6 | ||
|
||
# start the node | ||
print_step "$COMMAND the $NODE_NAME node" | ||
vnode $COMMAND --name $NODE_NAME |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#! /bin/bash | ||
SCRIPT_DIR=$(realpath "$(dirname "$0")") | ||
source $SCRIPT_DIR/node.sh start blueberry |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#! /bin/bash | ||
SCRIPT_DIR=$(realpath "$(dirname "$0")") | ||
source $SCRIPT_DIR/node.sh stop blueberry |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters