Moved ftp backup to external script file

pull/2/head
mandlm 2020-02-03 20:46:25 +01:00
parent ef841499f7
commit 033202a6a4
3 changed files with 9 additions and 11 deletions

View File

@ -9,8 +9,8 @@ RUN TF=`mktemp` &&\
EXPOSE 35621/TCP 35622/UDP 35623/TCP
COPY prefilebackup /usr/local/etc/urbackup/
RUN chmod 0700 /usr/local/etc/urbackup/prefilebackup
COPY scripts/* /usr/local/etc/urbackup/
RUN chmod 0700 /usr/local/etc/urbackup/*
WORKDIR /app
COPY run.sh /app/

View File

@ -1,16 +1,8 @@
#!/usr/bin/env bash
if [[ -z "$DO_FTP_BACKUP" ]]; then
exit 0
fi
# DISTANT DIRECTORY
REMOTE_DIR="/"
LOCAL_DIR="/backup/ftp"
#LOCAL DIRECTORY
LOCAL_DIR="/backup"
# RUNTIME!
echo
echo "Starting download $REMOTE_DIR from $FTP_HOST to $LOCAL_DIR"
date

6
scripts/prefilebackup Normal file
View File

@ -0,0 +1,6 @@
#!/usr/bin/env bash
if [[ -z "$DO_FTP_BACKUP" ]]; then
sh ftp_backup.sh
fi