.
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
source "${AGENT_PATH}/_common.sh"
|
||||
check_required_env_vars "CONTAINER_NAME" "DATA_VOLUME" "CONFIG_VOLUME" "CONFIG_PATH"
|
||||
check_required_env_vars
|
||||
|
||||
_stop_container "$CONTAINER_NAME"
|
||||
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
source "${AGENT_PATH}/_common.sh"
|
||||
check_required_env_vars "CONTAINER_NAME" "IMAGE_REGISTRY" "IMAGE_REPO" "IMAGE_TAG" "DATA_VOLUME" "CONFIG_VOLUME"
|
||||
check_required_env_vars "CONTAINER_NAME" "IMAGE_REGISTRY" "IMAGE_REPO" "IMAGE_TAG" "DATA_VOLUME" "CONFIG_VOLUME" "CONFIG_PATH"
|
||||
|
||||
if ! autocreate volume=$DATA_VOLUME volume=$CONFIG_VOLUME; then
|
||||
die "Failed to autocreate volumes and paths"
|
||||
|
@ -1,6 +1,6 @@
|
||||
#!/bin/bash
|
||||
source "${AGENT_PATH}/_common.sh"
|
||||
check_required_env_vars "CONTAINER_NAME"
|
||||
check_required_env_vars
|
||||
|
||||
# Main script.
|
||||
echo "Container ${CONTAINER_NAME} logs:"
|
||||
|
@ -1,12 +1,12 @@
|
||||
#!/bin/bash
|
||||
source "${AGENT_PATH}/_common.sh"
|
||||
check_required_env_vars
|
||||
|
||||
# NUKE SCRIPT
|
||||
# This is run after the uninstall.sh script to delete all data.
|
||||
# dropshell handles the configuration files, so we just need to remove
|
||||
# any docker volumes and any custom local data folders.
|
||||
|
||||
check_required_env_vars "CONTAINER_NAME" "DATA_VOLUME" "CONFIG_VOLUME" "CONFIG_PATH"
|
||||
|
||||
if ! autonuke volume=$DATA_VOLUME volume=$CONFIG_VOLUME; then
|
||||
die "Failed to nuke"
|
||||
|
@ -1,9 +1,9 @@
|
||||
#!/bin/bash
|
||||
source "${AGENT_PATH}/_common.sh"
|
||||
check_required_env_vars
|
||||
|
||||
# RESTORE SCRIPT
|
||||
|
||||
check_required_env_vars "DATA_VOLUME" "CONFIG_VOLUME" "CONFIG_PATH"
|
||||
|
||||
# uninstall container 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
|
||||
|
||||
# START SCRIPT
|
||||
# The start script is required for all templates.
|
||||
# It is used to start the service on the server.
|
||||
|
||||
check_required_env_vars "CONTAINER_NAME" "DATA_VOLUME" "CONFIG_VOLUME"
|
||||
|
||||
|
||||
DOCKER_RUN_CMD="docker run -d \
|
||||
|
@ -1,12 +1,12 @@
|
||||
#!/bin/bash
|
||||
source "${AGENT_PATH}/_common.sh"
|
||||
check_required_env_vars
|
||||
|
||||
# STATUS SCRIPT
|
||||
# The status script is OPTIONAL.
|
||||
# It is used to return the status of the service (0 is healthy, 1 is unhealthy).
|
||||
|
||||
# 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
|
||||
|
||||
# STOP SCRIPT
|
||||
# The stop script is required for all templates.
|
||||
# It is used to stop the service on the server.
|
||||
|
||||
check_required_env_vars "CONTAINER_NAME"
|
||||
|
||||
_stop_container $CONTAINER_NAME || die "Failed to stop container ${CONTAINER_NAME}"
|
||||
|
||||
|
@ -1,11 +1,11 @@
|
||||
#!/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.
|
||||
|
||||
check_required_env_vars "CONTAINER_NAME" "IMAGE_REGISTRY" "IMAGE_REPO" "IMAGE_TAG"
|
||||
|
||||
_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