mirror of
https://github.com/adferrand/docker-backuppc.git
synced 2023-11-05 04:40:26 +01:00
Release 4.4.0-1
This commit is contained in:
parent
e7ff7c3c8b
commit
95034418c1
@ -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
|
||||
|
@ -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)
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user