Release 4.4.0-1

This commit is contained in:
Adrien Ferrand 2020-07-24 01:23:58 +02:00
parent e7ff7c3c8b
commit 95034418c1
4 changed files with 16 additions and 10 deletions

View File

@ -2,6 +2,10 @@
## Unreleased ## Unreleased
## [4.4.1 - 24/07/2020]
# Modified
* Conditionnally create the symlink /bin/bzip2 to prevent regressions
## [4.4.0 - 21/06/2020] ## [4.4.0 - 21/06/2020]
# Added # Added
* Add JSON::RS perl dependency to allow BackupPC metrics in JSON format * Add JSON::RS perl dependency to allow BackupPC metrics in JSON format

View File

@ -1,5 +1,5 @@
#  ![](https://raw.githubusercontent.com/adferrand/docker-backuppc/master/images/logo_200px.png) adferrand/backuppc #  ![](https://raw.githubusercontent.com/adferrand/docker-backuppc/master/images/logo_200px.png) adferrand/backuppc
![](https://img.shields.io/badge/tags-4%20latest-lightgrey.svg) [![](https://images.microbadger.com/badges/version/adferrand/backuppc:4.3.2-6.svg) ![](https://images.microbadger.com/badges/image/adferrand/backuppc:4.3.2-6.svg)](https://microbadger.com/images/adferrand/backuppc:4.3.2-6) [![CircleCI](https://circleci.com/gh/adferrand/docker-backuppc/tree/master.svg?style=shield)](https://circleci.com/gh/adferrand/docker-backuppc/tree/master) ![](https://img.shields.io/badge/tags-4%20latest-lightgrey.svg) [![](https://images.microbadger.com/badges/version/adferrand/backuppc:4.4.0-1.svg) ![](https://images.microbadger.com/badges/image/adferrand/backuppc:4.4.0-1.svg)](https://microbadger.com/images/adferrand/backuppc:4.4.0-1) [![CircleCI](https://circleci.com/gh/adferrand/docker-backuppc/tree/master.svg?style=shield)](https://circleci.com/gh/adferrand/docker-backuppc/tree/master)
* [Container functionalities](#container-functionalities) * [Container functionalities](#container-functionalities)
* [About BackupPC](#about-backuppc) * [About BackupPC](#about-backuppc)

View File

@ -1 +1 @@
4.3.2-6 4.4.0-1

View File

@ -1,17 +1,19 @@
#!/bin/sh #!/bin/bash
set -e set -e
BACKUPPC_UUID="${BACKUPPC_UUID:-1000}" BACKUPPC_UUID="${BACKUPPC_UUID:-1000}"
BACKUPPC_GUID="${BACKUPPC_GUID:-1000}" BACKUPPC_GUID="${BACKUPPC_GUID:-1000}"
BACKUPPC_USERNAME=`getent passwd "$BACKUPPC_UUID" | cut -d: -f1` BACKUPPC_USERNAME=$(getent passwd "$BACKUPPC_UUID" | cut -d: -f1)
BACKUPPC_GROUPNAME=`getent group "$BACKUPPC_GUID" | cut -d: -f1` BACKUPPC_GROUPNAME=$(getent group "$BACKUPPC_GUID" | cut -d: -f1)
if [ -f /firstrun ]; then if [ -f /firstrun ]; then
echo 'First run of the container. BackupPC will be installed.' echo 'First run of the container. BackupPC will be installed.'
echo 'If exist, configuration and data will be reused and upgraded as needed.' echo 'If exist, configuration and data will be reused and upgraded as needed.'
# Executable bzip2 seems to have been moved into /usr/bin in latest Alpine version. Fix that. # Executable bzip2 seems to have been moved into /usr/bin in latest Alpine version. Fix that.
ln -s /usr/bin/bzip2 /bin/bzip2 if [ ! -f /bin/bzip2 ]; then
ln -s /usr/bin/bzip2 /bin/bzip2
fi
# Configure timezone if needed # Configure timezone if needed
if [ -n "$TZ" ]; then if [ -n "$TZ" ]; then
@ -38,15 +40,15 @@ if [ -f /firstrun ]; then
# Extract BackupPC # Extract BackupPC
cd /root cd /root
tar xf BackupPC-$BACKUPPC_VERSION.tar.gz tar xf "BackupPC-$BACKUPPC_VERSION.tar.gz"
cd /root/BackupPC-$BACKUPPC_VERSION cd "/root/BackupPC-$BACKUPPC_VERSION"
# Configure WEB UI access # Configure WEB UI access
configure_admin="" configure_admin=""
if [ ! -f /etc/backuppc/htpasswd ]; then if [ ! -f /etc/backuppc/htpasswd ]; then
htpasswd -b -c /etc/backuppc/htpasswd "${BACKUPPC_WEB_USER:-backuppc}" "${BACKUPPC_WEB_PASSWD:-password}" htpasswd -b -c /etc/backuppc/htpasswd "${BACKUPPC_WEB_USER:-backuppc}" "${BACKUPPC_WEB_PASSWD:-password}"
configure_admin="--config-override CgiAdminUsers='${BACKUPPC_WEB_USER:-backuppc}'" configure_admin="--config-override CgiAdminUsers='${BACKUPPC_WEB_USER:-backuppc}'"
elif [ -n "$BACKUPPC_WEB_USER" -a -n "$BACKUPPC_WEB_PASSWD" ]; then elif [[ -n "$BACKUPPC_WEB_USER" && -n "$BACKUPPC_WEB_PASSWD" ]]; then
touch /etc/backuppc/htpasswd touch /etc/backuppc/htpasswd
htpasswd -b /etc/backuppc/htpasswd "${BACKUPPC_WEB_USER}" "${BACKUPPC_WEB_PASSWD}" htpasswd -b /etc/backuppc/htpasswd "${BACKUPPC_WEB_USER}" "${BACKUPPC_WEB_PASSWD}"
configure_admin="--config-override CgiAdminUsers='$BACKUPPC_WEB_USER'" configure_admin="--config-override CgiAdminUsers='$BACKUPPC_WEB_USER'"
@ -114,7 +116,7 @@ if [ -f /firstrun ]; then
chown "${BACKUPPC_USERNAME}:${BACKUPPC_GROUPNAME}" /var/log/msmtp.log chown "${BACKUPPC_USERNAME}:${BACKUPPC_GROUPNAME}" /var/log/msmtp.log
# Clean # Clean
rm -rf /root/BackupPC-$BACKUPPC_VERSION.tar.gz /root/BackupPC-$BACKUPPC_VERSION /firstrun rm -rf "/root/BackupPC-$BACKUPPC_VERSION.tar.gz" "/root/BackupPC-$BACKUPPC_VERSION /firstrun"
fi fi
export BACKUPPC_UUID export BACKUPPC_UUID