Skip to content

Commit b74e874

Browse files
authored
Fix data persistance problem (PR #5)
2 parents 09ac67d + bebb92e commit b74e874

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

rootfs/opt/z-way-server/run.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@ for path in $paths; do
2828
echo "Created ${path} in /data."
2929
fi
3030
fi
31+
rm -Rf $path
3132
ln -sf /data$path $path
3233
echo "Created symlink for ${path}."
3334
done
@@ -38,7 +39,8 @@ if [ ! -e /data/opt/z-way-server/configs/config ]; then
3839
mv /opt/z-way-server/config /data/opt/z-way-server/configs/
3940
echo "Moved and symlinked config directory."
4041
fi
41-
ln -sf /data/opt/z-way-server/configs/ /opt/z-way-server/
42+
rm -Rf /opt/z-way-server/config
43+
ln -sf /data/opt/z-way-server/configs/ /opt/z-way-server/configs
4244

4345
# Start services
4446
/etc/init.d/z-way-server start

0 commit comments

Comments
 (0)