diff --git a/CHANGELOG.md b/CHANGELOG.md index c8cacec..6743f16 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ ## Unreleased +## [4.4.1 - 24/07/2020] +# Modified +* Conditionnally create the symlink /bin/bzip2 to prevent regressions + ## [4.4.0 - 21/06/2020] # Added * Add JSON::RS perl dependency to allow BackupPC metrics in JSON format diff --git a/README.md b/README.md index 4da0420..35ed9e2 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ #  ![](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) * [About BackupPC](#about-backuppc) diff --git a/VERSION b/VERSION index 20c4572..aab945e 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -4.3.2-6 +4.4.0-1 diff --git a/files/entrypoint.sh b/files/entrypoint.sh index 584a36e..83baea3 100755 --- a/files/entrypoint.sh +++ b/files/entrypoint.sh @@ -1,17 +1,19 @@ -#!/bin/sh +#!/bin/bash set -e BACKUPPC_UUID="${BACKUPPC_UUID:-1000}" BACKUPPC_GUID="${BACKUPPC_GUID:-1000}" -BACKUPPC_USERNAME=`getent passwd "$BACKUPPC_UUID" | cut -d: -f1` -BACKUPPC_GROUPNAME=`getent group "$BACKUPPC_GUID" | cut -d: -f1` +BACKUPPC_USERNAME=$(getent passwd "$BACKUPPC_UUID" | cut -d: -f1) +BACKUPPC_GROUPNAME=$(getent group "$BACKUPPC_GUID" | cut -d: -f1) if [ -f /firstrun ]; then echo 'First run of the container. BackupPC will be installed.' 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. - ln -s /usr/bin/bzip2 /bin/bzip2 + if [ ! -f /bin/bzip2 ]; then + ln -s /usr/bin/bzip2 /bin/bzip2 + fi # Configure timezone if needed if [ -n "$TZ" ]; then @@ -38,15 +40,15 @@ if [ -f /firstrun ]; then # Extract BackupPC cd /root - tar xf BackupPC-$BACKUPPC_VERSION.tar.gz - cd /root/BackupPC-$BACKUPPC_VERSION + tar xf "BackupPC-$BACKUPPC_VERSION.tar.gz" + cd "/root/BackupPC-$BACKUPPC_VERSION" # Configure WEB UI access configure_admin="" if [ ! -f /etc/backuppc/htpasswd ]; then htpasswd -b -c /etc/backuppc/htpasswd "${BACKUPPC_WEB_USER:-backuppc}" "${BACKUPPC_WEB_PASSWD:-password}" 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 htpasswd -b /etc/backuppc/htpasswd "${BACKUPPC_WEB_USER}" "${BACKUPPC_WEB_PASSWD}" 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 # 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 export BACKUPPC_UUID