This commit is contained in:
Kroese 2023-04-16 16:06:21 +02:00 committed by GitHub
parent ed1fb9d9c5
commit ab89adffe3

View File

@ -7,17 +7,15 @@ IMG="/storage"
[ ! -d "$IMG" ] && echo "Storage folder (${IMG}) not found!" && exit 69
[ ! -f "/run/run.sh" ] && echo "Script must run inside Docker container!" && exit 60
if [ -z $URL ]; then
if [ -f "$IMG"/dsm.ver ]; then
if [ -f "$IMG"/dsm.ver ]; then
BASE=$(cat "${IMG}/dsm.ver")
else
else
# Fallback for old installs
BASE="DSM_VirtualDSM_42962"
fi
else
BASE=$(basename "$URL" .pat)
fi
[ -n $URL ] && BASE=$(basename "$URL" .pat)
if [[ ! -f "$IMG/$BASE.boot.img" ]] || [[ ! -f "$IMG/$BASE.system.img" ]]; then
. /run/install.sh
fi