mirror of
https://github.com/Fishwaldo/docker-rsync.git
synced 2025-03-15 19:42:44 +00:00
refactor: OWNER -> USER for clarity
This commit is contained in:
parent
653bb44086
commit
7b6ba17b06
1 changed files with 4 additions and 4 deletions
|
@ -1,17 +1,17 @@
|
|||
#!/bin/sh
|
||||
VOLUME=${VOLUME:-/volume}
|
||||
ALLOW=${ALLOW:-192.168.0.0/16 172.16.0.0/12}
|
||||
OWNER=${OWNER:-nobody}
|
||||
USER=${USER:-nobody}
|
||||
GROUP=${GROUP:-nogroup}
|
||||
|
||||
mkdir -p ${VOLUME}
|
||||
|
||||
getent group ${GROUP} > /dev/null || addgroup ${GROUP}
|
||||
getent passwd ${OWNER} > /dev/null || adduser -D -H -G ${GROUP} ${OWNER}
|
||||
chown -R ${OWNER}:${GROUP} ${VOLUME}
|
||||
getent passwd ${USER} > /dev/null || adduser -D -H -G ${GROUP} ${USER}
|
||||
chown -R ${USER}:${GROUP} ${VOLUME}
|
||||
|
||||
cat <<EOF > /etc/rsyncd.conf
|
||||
uid = ${OWNER}
|
||||
uid = ${USER}
|
||||
gid = ${GROUP}
|
||||
use chroot = yes
|
||||
log file = /dev/stdout
|
||||
|
|
Loading…
Add table
Reference in a new issue