mirror of
https://github.com/newnius/Dockerfiles.git
synced 2025-06-06 08:11:54 +00:00
update rsync
This commit is contained in:
parent
d9dc56d632
commit
2faacaea37
@ -4,6 +4,8 @@ MAINTAINER Newnius <newnius.cn@gmail.com>
|
||||
|
||||
RUN apk add --no-cache rsync
|
||||
|
||||
RUN ln -s /var/log/rsyncd.log /dev/stdout
|
||||
|
||||
ADD bootstrap.sh /etc/bootstrap.sh
|
||||
|
||||
ENTRYPOINT ["/etc/bootstrap.sh"]
|
||||
|
@ -2,9 +2,9 @@
|
||||
|
||||
if ! [[ -z "${AUTH_PASSWORD}" ]]; then
|
||||
echo "$AUTH_PASSWORD" > /etc/rsyncd.secret
|
||||
chmod 600 /etc/rsyncd.secret
|
||||
if ! [[ -z "${AUTH_USER}" ]]; then
|
||||
echo "$AUTH_USER:$AUTH_PASSWORD" > /etc/rsyncd.secrets
|
||||
chmod 600 /etc/rsyncd.secrets
|
||||
fi
|
||||
fi
|
||||
|
||||
@ -12,6 +12,8 @@ if [ -d /config/ ]; then
|
||||
cp /config/rsync* /etc/
|
||||
fi
|
||||
|
||||
chmod 600 /etc/rsyncd.secrets
|
||||
|
||||
if ! [[ -z $@ ]]; then
|
||||
# use eval because commands likes `key=value command` would cause file not found error when using $@, but this eval will ruin current environment
|
||||
eval $@
|
||||
|
Loading…
Reference in New Issue
Block a user