diff --git a/src/service_runner.cpp b/src/service_runner.cpp index 93f6a54..ab050a4 100644 --- a/src/service_runner.cpp +++ b/src/service_runner.cpp @@ -120,7 +120,7 @@ bool service_runner::uninstall() { } // 3. Run uninstall script if it exists - std::string uninstall_script = remotepath::service_template(mServer, mService) + "/_uninstall.sh"; + std::string uninstall_script = remotepath::service_template(mServer, mService) + "/uninstall.sh"; bool script_exists = mServerEnv.check_remote_file_exists(uninstall_script); if (script_exists) { diff --git a/templates/simple-object-storage/ssh.sh b/templates/simple-object-storage/ssh.sh new file mode 100644 index 0000000..33189c8 --- /dev/null +++ b/templates/simple-object-storage/ssh.sh @@ -0,0 +1,14 @@ +#!/bin/bash +source "$(dirname "$0")/_common.sh" + +check_required_env_vars "CONTAINER_NAME" + +if ! _is_container_running "$CONTAINER_NAME"; then + die "Container ${CONTAINER_NAME} is not running. Can't connect to it." +fi + +echo "Connecting to ${CONTAINER_NAME}..." + +docker exec -it ${CONTAINER_NAME} bash + +echo "Disconnected from ${CONTAINER_NAME}" diff --git a/templates/simple-object-storage/start.sh b/templates/simple-object-storage/start.sh index 19f1dab..ce7469a 100644 --- a/templates/simple-object-storage/start.sh +++ b/templates/simple-object-storage/start.sh @@ -6,7 +6,7 @@ # It is called with the path to the server specific env file as an argument. source "$(dirname "$0")/_common.sh" -check_required_env_vars "CONTAINER_NAME" "HOST_PORT" "VOLUME_NAME" +check_required_env_vars "CONTAINER_NAME" "HOST_PORT" "VOLUME_NAME" "WRITE_TOKENS" # check volume exists. if ! docker volume inspect "${VOLUME_NAME}" &>/dev/null; then