Files
dropshell-templates/squashkiwi-streaming/restore.sh
Your Name 4c2eff0011
All checks were successful
Test and Publish Templates / test-and-publish (push) Successful in 22s
config: Update 7 files
2025-09-01 14:16:35 +12:00

23 lines
875 B
Bash
Executable File

#!/bin/bash
# shellcheck disable=SC1091
source "${AGENT_PATH}/common.sh"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "${SCRIPT_DIR}/_paths.sh"
_check_required_env_vars "CONTAINER_NAME" "LOCAL_DATA_FOLDER" "BACKUP_FILE" "TEMP_DIR"
# RESTORE SCRIPT
# The restore script is OPTIONAL.
# It is used to restore the service on the server from a backup file.
# It is called with one argument: the path to the backup file.
# # Stop container before backup
"${SCRIPT_DIR}/uninstall.sh" || _die "Failed to uninstall service before restore"
# shellcheck disable=SC2046
restore_items $(get_squashkiwi_streaming_paths) || _die "Failed to restore data folder from backup"
# reinstall service
"${SCRIPT_DIR}/install.sh" || _die "Failed to reinstall service after restore"
echo "Restore complete! Service is running again on port $HOST_PORT with restored website."