Templates.
This commit is contained in:
17
static-website/destroy.sh
Executable file
17
static-website/destroy.sh
Executable file
@ -0,0 +1,17 @@
|
||||
#!/bin/bash
|
||||
source "${AGENT_PATH}/common.sh"
|
||||
_check_required_env_vars "LOCAL_DATA_FOLDER" "CONTAINER_NAME"
|
||||
|
||||
# Removes container and local data folder.
|
||||
|
||||
# Call uninstall script first
|
||||
./uninstall.sh
|
||||
|
||||
datadestroy "path=${LOCAL_DATA_FOLDER}" || _die "Failed to Destroy ${LOCAL_DATA_FOLDER}"
|
||||
|
||||
if [ -d "${LOCAL_DATA_FOLDER}" ]; then
|
||||
echo "datadestroy failed to remove ${LOCAL_DATA_FOLDER}"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "Destroyed ${CONTAINER_NAME}."
|
Reference in New Issue
Block a user