#!/bin/bash -e

#
# logMessages.sh
#
#    Compone i messaggi di log
#

########################################################################
#
# Predispone l'ambiente di esecuzione
#

#
# Attenzione!!!!
#    la variabile pmxBackupRestorePath e' valorizzata all'interno
#    del file /etc/profile
#

# Importa la definizione delle costanti simboliche
source $pmxBackupRestorePath/scripts/symbolicConstantsSetup.sh

# Importa la definizione delle utilities
source "$UTILITIES"
#
########################################################################

########################################################################
# Componenti dei messaggi
########################################################################

#
# prefisso comune a tutti i messaggi
#
msgPrefix=" - From $(basename $0) - "

########################################################################
# Scripts
########################################################################

#
# Script chiamante
#
msgScriptCaller="$msgPrefix Caller:"

#
# Messaggi di ingresso e di uscita dagli script
#
msgIntoTheScript="$msgPrefix Get in"
msgOutOfTheScript="$msgPrefix Get out"

#
# Numero di parametri passati allo script non corretto
#
msgIncorrectParameterNumber="$msgPrefix incorrect \
number of parameters.\nIt shoud be: $0"

########################################################################
# Containers
########################################################################

#
# Identificatore del container
#
msgContainerId="$msgPrefix Container Id: "

#
# Stato corrente del container
#
msgCurrentContainerStatus="$msgPrefix Current Container status: "

#
# Stato del container duante l'esecuzione del backup
#
msgContainerStatusDuringBackup="$msgPrefix Container status during \
backup: "

#
# Stato del container al termine del backup
#
msgContainerStatusAfterBackup="$msgPrefix Container status after \
backup: "

#
# Il container deve essere rimosso
#
msgContainerMustBeRemoved="$msgPrefix The container must be removed"

########################################################################
# File system di supporto al backup
########################################################################

# path del file di log
msgLogFilePath="$msgPrefix Log file path:\n "

########################################################################
# Backups
########################################################################

# path del file di backup dell'area dati di servizio
msgDataBackupPath="$msgPrefix Data backup path:\n "

# nome del file di backup dell'area dati di servizio
msgDataBackupName="$msgPrefix Data backup name:\n "

# path del file di backup del container
msgContainerBackupPath="$msgPrefix Container backup path:\n "
           
#
# Gestione del numero di backup
#
msgMaxNroOfBackupsExceeded="$msgPrefix Max no of backups exceeded"
msgRemovedBackup="$msgPrefix Removed backup: "

########################################################################
# Backups
########################################################################

#
# Backup del container inesistente
#
msgNoSuchContainerBackupFile="$msgPrefix No such container backup file"

#
# Backup dell'area dati gestita dal container inesistente
#
msgNoSuchDataBackupFile="$msgPrefix No such data backup file"

#
# Metodo di compressione utilizzato per i file di backup
#
msgCompressionMethod="$msgPrefix Compression method:"

# inizio e termine della compressione lzop dei file di backup
msgCompressionStartingTime="$msgPrefix Lzop compression starting"
msgCompressionEndingTime="$msgPrefix Lzop compression ending"

#
# Il container specificato nel file dei parametri specifico del servizio
# e quello nel nome del backup non coincidono
#

msgNotMatchingContainers="$msgPrefix The container in the name of the backup \
and that in the parameters specific of the service do not match"

########################################################################
# Servizi
########################################################################

# Assenza di un'area dati di servizio
msgNoServiceDataArea="$msgPrefix Not provided service data area"

#
# File dei parametri specifico del servizio non esistente
#
msgNoSuchParametersFile="$msgPrefix No such parameters file"

#
# Pulizia dell'area dati
#
msgClearDataContent="$msgPrefix Data area content removed"

#
# Creazione della directory per l'area dati
#
msgDataDirCreation="$msgPrefix Data area directory created"





#
# Verificare se vanno cancellati
#
msgUponRestoreContainerStatus="$msgPrefix Container status upon restore:"
msgNonExistingContainer="$msgPrefix Non-existing container" 
# stato del container al termine del restore
msgContainerStatusAfterRestore="$msgPrefix Container status after \
restore: "


# Rimozione del Container
msgContainerRemoved="$msgPrefix Container removed"




