Fixing missing dependencies and permissions to .pgpass file

This commit is contained in:
Paulino Padial 2018-01-23 19:21:31 +01:00
parent 5578012f8a
commit 812260a7c6
3 changed files with 4 additions and 2 deletions

View File

@ -8,7 +8,7 @@ ENV LOG_LEVEL=8
# Packages installation # Packages installation
RUN apt-get update && apt-get upgrade -y && \ RUN apt-get update && apt-get upgrade -y && \
apt-get install -y autopostgresqlbackup cron bzip2 gzip && \ apt-get install -y autopostgresqlbackup cron bzip2 gzip postgresql-client && \
apt-get purge -y --auto-remove && \ apt-get purge -y --auto-remove && \
rm -rf /var/lib/apt/lists/* rm -rf /var/lib/apt/lists/*

View File

@ -58,7 +58,7 @@ MAILADDR="root"
#============================================================= #=============================================================
# List of DBBNAMES for Monthly Backups. # List of DBBNAMES for Monthly Backups.
MDBNAMES="template1 $DBNAMES" MDBNAMES="${DBNAMES}"
# List of DBNAMES to EXLUCDE if DBNAMES are set to all (must be in " quotes) # List of DBNAMES to EXLUCDE if DBNAMES are set to all (must be in " quotes)
DBEXCLUDE="${DBEXCLUDE}" DBEXCLUDE="${DBEXCLUDE}"

View File

@ -47,6 +47,8 @@ cat <<-EOF > ${HOME}/.pgpass
${DBHOST:-localhost}:*:*:${USERNAME:-postgres}:${PASSPHRASE} ${DBHOST:-localhost}:*:*:${USERNAME:-postgres}:${PASSPHRASE}
EOF EOF
# Permissions for this file shoudl be set to 0600
chmod +x 0600 ${HOME}/.pgpass
# Execute cron with parameters (autopostgresql script is under /etc/cron.daily) # Execute cron with parameters (autopostgresql script is under /etc/cron.daily)
echo "Execute cron service..." echo "Execute cron service..."