dropshell release 2025.0519.1727
Some checks failed
Dropshell Test / Build_and_Test (push) Has been cancelled

This commit is contained in:
Your Name 2025-05-19 17:28:01 +12:00
parent 625de98890
commit d8236a58df

View File

@ -21,11 +21,6 @@ fi
_check_required_env_vars "AGENT_PATH" _check_required_env_vars "AGENT_PATH"
function install_bb64() { function install_bb64() {
# check curl installed
if ! command -v curl &> /dev/null; then
_die "Curl is not installed. Curl is required for agent installation."
fi
curl -fsSL "https://gitea.jde.nz/public/bb64/releases/download/latest/install.sh" | bash -s -- "$AGENT_PATH" "$(id -u $USER):$(id -g $USER)" curl -fsSL "https://gitea.jde.nz/public/bb64/releases/download/latest/install.sh" | bash -s -- "$AGENT_PATH" "$(id -u $USER):$(id -g $USER)"
# test result code from curl # test result code from curl
@ -34,32 +29,54 @@ function install_bb64() {
fi fi
# test if bb64 is installed # test if bb64 is installed
"$AGENT_PATH/bb64" -v VER=$("$AGENT_PATH/bb64" -v)
if [ $? -ne 0 ]; then if [ $? -ne 0 ]; then
_die "bb64 did not install correctly." _die "bb64 did not install correctly."
fi fi
echo "bb64 installed successfully." echo "bb64 v$VER installed."
return 0; return 0;
} }
#-------------------------------------------------------------------------
# Check pre-requisites
# Check if curl is installed
if ! command -v curl &> /dev/null; then
_die "Curl is not installed. Curl is required for agent installation."
fi
# check docker installation
if ! command -v docker &> /dev/null; then
echo "Docker is not installed. Docker is required for agent installation."
exit 1
fi
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
echo "Installing dropshell agent..." echo "Installing dropshell agent..."
install_bb64 install_bb64
#------------------------------------------------------------------------- #-------------------------------------------------------------------------
echo "Running remote agent self-test..." # confirm we're in a good state.
required_files=(
"$AGENT_PATH/bb64"
"$AGENT_PATH/_allservicesstatus.sh"
"$AGENT_PATH/common.sh"
"$AGENT_PATH/datacommands.sh"
)
#------------------------------------------------------------------------- # check if all files exist
for file in "${required_files[@]}"; do
echo "Completed remote agent self-test." if [ ! -f "$file" ]; then
_die "$file does not exist. Please check the installation."
fi
done
#------------------------------------------------------------------------- #-------------------------------------------------------------------------