Skip to content

Commit b0611f2

Browse files
authored
Update entrypoint.sh
1 parent 93b4452 commit b0611f2

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

services/comfy/entrypoint.sh

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,15 @@ MOUNTS["${ROOT}/user"]="/data/config/comfy/user"
1818

1919
for to_path in "${!MOUNTS[@]}"; do
2020
from_path="${MOUNTS[${to_path}]}"
21-
rm -rf "${to_path}"
22-
if [ ! -f "$from_path" ]; then
21+
if [ -e "${to_path}" ] || [ -L "${to_path}" ]; then
22+
rm -rf "${to_path}"
23+
fi
24+
if [ ! -d "$from_path" ]; then
2325
mkdir -vp "$from_path"
2426
fi
2527
mkdir -vp "$(dirname "${to_path}")"
2628
ln -sT "${from_path}" "${to_path}"
27-
echo Mounted $(basename "${from_path}")
29+
echo "Mounted ${from_path} -> ${to_path}"
2830
done
2931

3032
if [ -f "/data/config/comfy/startup.sh" ]; then

0 commit comments

Comments
 (0)