.
This commit is contained in:
@ -1,11 +1,11 @@
|
||||
#!/bin/bash
|
||||
source "${AGENT_PATH}/_common.sh"
|
||||
check_required_env_vars
|
||||
|
||||
# Simple Object Storage Backup Script
|
||||
# Creates a backup tarball of the volume contents.
|
||||
|
||||
|
||||
_check_required_env_vars "CONTAINER_NAME" "VOLUME_NAME"
|
||||
|
||||
# HOT backup is fine for simple-object-storage
|
||||
autobackup "volume=${VOLUME_NAME}" $1 $2 || _die "Failed to create backup"
|
||||
|
@ -1,11 +1,11 @@
|
||||
#!/bin/bash
|
||||
source "${AGENT_PATH}/_common.sh"
|
||||
check_required_env_vars
|
||||
|
||||
# Simple Object Storage Install Script
|
||||
# Pulls image, creates volume/config, starts container.
|
||||
|
||||
|
||||
_check_required_env_vars "CONTAINER_NAME" "IMAGE_REGISTRY" "IMAGE_REPO" "IMAGE_TAG" "VOLUME_NAME" "HOST_NAME"
|
||||
|
||||
autocreate "volume=${VOLUME_NAME}"
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
#!/bin/bash
|
||||
source "${AGENT_PATH}/_common.sh"
|
||||
check_required_env_vars
|
||||
|
||||
# Simple Object Storage Logs Script
|
||||
# Shows the logs for the running container.
|
||||
|
||||
|
||||
_check_required_env_vars "CONTAINER_NAME"
|
||||
|
||||
echo "Showing logs for ${CONTAINER_NAME}... (Press Ctrl+C to stop)"
|
||||
_grey_start
|
||||
|
@ -1,9 +1,9 @@
|
||||
#!/bin/bash
|
||||
source "${AGENT_PATH}/_common.sh"
|
||||
check_required_env_vars
|
||||
|
||||
# Simple Object Storage Nuke Script
|
||||
# Removes container AND volume.
|
||||
|
||||
|
||||
_check_required_env_vars "CONTAINER_NAME" "VOLUME_NAME"
|
||||
autonuke "volume=${VOLUME_NAME}"
|
||||
|
@ -1,5 +1,6 @@
|
||||
#!/bin/bash
|
||||
source "${AGENT_PATH}/_common.sh"
|
||||
check_required_env_vars
|
||||
|
||||
# PORT SCRIPT
|
||||
# The port script is OPTIONAL.
|
||||
@ -8,7 +9,6 @@ source "${AGENT_PATH}/_common.sh"
|
||||
|
||||
|
||||
# Required environment variables
|
||||
check_required_env_vars "CONFIG_PATH"
|
||||
|
||||
# determine port.
|
||||
command -v jq &> /dev/null || die "jq could not be found, please install it"
|
||||
|
@ -1,11 +1,11 @@
|
||||
#!/bin/bash
|
||||
source "${AGENT_PATH}/_common.sh" || _die "Failed to source _common.sh"
|
||||
check_required_env_vars
|
||||
|
||||
# Simple Object Storage Restore Script
|
||||
# Restores data from a backup file.
|
||||
|
||||
|
||||
_check_required_env_vars "CONTAINER_NAME" "VOLUME_NAME"
|
||||
|
||||
echo "Uninstalling service before restore..."
|
||||
bash ./uninstall.sh || _die "Failed to uninstall service before restore"
|
||||
|
@ -1,11 +1,11 @@
|
||||
#!/bin/bash
|
||||
source "${AGENT_PATH}/_common.sh"
|
||||
check_required_env_vars
|
||||
|
||||
# Simple Object Storage SSH Script
|
||||
# Opens a shell in the running container.
|
||||
|
||||
|
||||
_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."
|
||||
|
@ -1,10 +1,10 @@
|
||||
#!/bin/bash
|
||||
source "${AGENT_PATH}/_common.sh"
|
||||
check_required_env_vars "CONTAINER_NAME" "VOLUME_NAME" "CONFIG_PATH" "IMAGE_REGISTRY" "IMAGE_REPO" "IMAGE_TAG"
|
||||
|
||||
# Simple Object Storage Start Script
|
||||
# Creates and starts the container using environment variables.
|
||||
|
||||
check_required_env_vars "CONTAINER_NAME" "VOLUME_NAME" "CONFIG_PATH"
|
||||
|
||||
# check volume exists.
|
||||
if ! docker volume inspect "${VOLUME_NAME}" &>/dev/null; then
|
||||
|
@ -1,10 +1,10 @@
|
||||
#!/bin/bash
|
||||
source "${AGENT_PATH}/_common.sh"
|
||||
check_required_env_vars
|
||||
|
||||
# STATUS SCRIPT
|
||||
|
||||
# This is an example of a status script that checks if the service is running.
|
||||
check_required_env_vars "CONTAINER_NAME"
|
||||
|
||||
# check if the service is running
|
||||
_is_container_running $CONTAINER_NAME || die "Service is not running - did not find container $CONTAINER_NAME."
|
||||
|
@ -1,11 +1,11 @@
|
||||
#!/bin/bash
|
||||
source "${AGENT_PATH}/_common.sh"
|
||||
check_required_env_vars
|
||||
|
||||
# Simple Object Storage Stop Script
|
||||
# Stops the running container.
|
||||
|
||||
|
||||
_check_required_env_vars "CONTAINER_NAME"
|
||||
|
||||
echo "Stopping service ${CONTAINER_NAME}..."
|
||||
_stop_container $CONTAINER_NAME || _die "Failed to stop container ${CONTAINER_NAME}"
|
||||
|
@ -1,12 +1,12 @@
|
||||
#!/bin/bash
|
||||
source "${AGENT_PATH}/_common.sh"
|
||||
check_required_env_vars
|
||||
|
||||
# UNINSTALL SCRIPT
|
||||
# The uninstall script is required for all templates.
|
||||
# It is used to uninstall the service from the server.
|
||||
# It is called with the path to the server specific env file as an argument.
|
||||
|
||||
check_required_env_vars "CONTAINER_NAME" "IMAGE_REGISTRY" "IMAGE_REPO" "IMAGE_TAG" "VOLUME_NAME"
|
||||
|
||||
_remove_container $CONTAINER_NAME || die "Failed to remove container ${CONTAINER_NAME}"
|
||||
_is_container_running && die "Couldn't stop existing container"
|
||||
|
Reference in New Issue
Block a user