mirror of
https://github.com/linuxserver/docker-smokeping.git
synced 2026-04-13 00:04:22 +08:00
revert the config copy routine, was replacing existing files
This commit is contained in:
parent
a9446f53b6
commit
75f00a623e
@ -1,5 +1,4 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
shopt -s globstar nullglob
|
||||
|
||||
# create folders
|
||||
mkdir -p \
|
||||
@ -7,14 +6,17 @@ mkdir -p \
|
||||
/var/cache/smokeping
|
||||
|
||||
# copy config files
|
||||
for file in /defaults/smoke-conf/*
|
||||
|
||||
PREV_DIR=$(pwd)
|
||||
|
||||
cd /defaults/smoke-conf || exit
|
||||
for i in $(find . -type f)
|
||||
do
|
||||
if [ ! -f "/config/${file}" ]
|
||||
then
|
||||
cp "${file}" "/config/"
|
||||
fi
|
||||
[[ ! -e "/config/${i}" ]] && cp -v "${i}" "/config/${i}"
|
||||
done
|
||||
|
||||
cd "${PREV_DIR}" || exit
|
||||
|
||||
# make symlinks
|
||||
[[ ! -e /var/www/localhost/smokeping ]] && ln -s \
|
||||
/usr/share/webapps/smokeping /var/www/localhost/smokeping
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user