mirror of
https://github.com/casjaysdevdocker/proftpd
synced 2025-01-18 00:34:26 -05:00
🗃️ Fixed: rootfs/usr/local/etc/docker/functions/entrypoint.sh 🗃️
rootfs/usr/local/etc/docker/functions/entrypoint.sh
This commit is contained in:
parent
c8edbe2d9f
commit
8786ef46af
@ -761,19 +761,19 @@ __initialize_system_etc() {
|
|||||||
local conf_dir="$1"
|
local conf_dir="$1"
|
||||||
local dir=""
|
local dir=""
|
||||||
local file=()
|
local file=()
|
||||||
local directories=()
|
local directories=""
|
||||||
if [ -n "$conf_dir" ] && [ -e "$conf_dir" ]; then
|
if [ -n "$conf_dir" ] && [ -e "$conf_dir" ]; then
|
||||||
files=("$(find "$conf_dir"/* -not -path '*/env/*' -type f 2>/dev/null | sed 's|'/config/'||g' | sort -u | grep -v '^$' | grep '^' || false)")
|
files="$(find "$conf_dir"/* -not -path '*/env/*' -type f 2>/dev/null | sed 's|'/config/'||g' | sort -u | grep -v '^$' | grep '^' || false)"
|
||||||
directories=("$(find "$conf_dir"/* -not -path '*/env/*' -type d 2>/dev/null | sed 's|'/config/'||g' | sort -u | grep -v '^$' | grep '^' || false)")
|
directories="$(find "$conf_dir"/* -not -path '*/env/*' -type d 2>/dev/null | sed 's|'/config/'||g' | sort -u | grep -v '^$' | grep '^' || false)"
|
||||||
echo "Copying config files to system: $conf_dir > /etc/${conf_dir//\/config\//}"
|
echo "Copying config files to system: $conf_dir > /etc/${conf_dir//\/config\//}"
|
||||||
if [ -n "${directories[*]}" ]; then
|
if [ -n "$directories" ]; then
|
||||||
for d in "${directories[@]}"; do
|
for d in $directories; do
|
||||||
dir="/etc/$d"
|
dir="/etc/$d"
|
||||||
echo "Creating directory: $dir"
|
echo "Creating directory: $dir"
|
||||||
mkdir -p "$dir"
|
mkdir -p "$dir"
|
||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
for f in "${files[@]}"; do
|
for f in $files; do
|
||||||
etc_file="/etc/$f"
|
etc_file="/etc/$f"
|
||||||
conf_file="/config/$f"
|
conf_file="/config/$f"
|
||||||
[ -f "$etc_file" ] && rm -Rf "$etc_file"
|
[ -f "$etc_file" ] && rm -Rf "$etc_file"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user