Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ FROM dockurr/windows-arm:${VERSION_ARG} AS build-arm64
FROM build-${TARGETARCH}

ARG VERSION_ARG="0.00"
RUN echo "$VERSION_ARG" > /run/version
RUN echo "$VERSION_ARG" > /etc/version

VOLUME /storage
EXPOSE 3389 8006
Expand Down
2 changes: 1 addition & 1 deletion src/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ finishInstall() {
fi

local file="$STORAGE/windows.ver"
cp -f /run/version "$file"
cp -f /etc/version "$file"
! setOwner "$file" && error "Failed to set the owner for \"$file\" !"

if [[ "$iso" == "$STORAGE/"* ]]; then
Expand Down
8 changes: 5 additions & 3 deletions src/mido.sh
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ download_windows() {
local id="$1"
local lang="$2"
local desc="$3"
local ovw="" rtick="" sku_id="" sku_url=""
local ovw="" rtick="" mdt="" sku_id="" sku_url=""
local iso_url="" iso_json="" language="" org_id=""
local instance_id="" vls_url="" ov_url="" ov_data=""
local session_id="" user_agent="" download_type=""
Expand All @@ -82,7 +82,6 @@ download_windows() {
esac

local url="https://www.microsoft.com/en-us/software-download/windows$windows_version"
[[ "${id,,}" == "win10"* ]] && url+="ISO"

# uuidgen: For MacOS (installed by default) and other systems (e.g. with no /proc) that don't have a kernel interface for generating random UUIDs
session_id=$(cat /proc/sys/kernel/random/uuid 2> /dev/null || uuidgen --random)
Expand Down Expand Up @@ -188,7 +187,10 @@ download_windows() {
# If any request is going to be blocked by Microsoft it's always this last one (the previous requests always seem to succeed)

iso_url="https://www.microsoft.com/software-download-connector/api/GetProductDownloadLinksBySku?profile=$profile&ProductEditionId=undefined&SKU=$sku_id&friendlyFileName=undefined&Locale=en-US&sessionID=$session_id"
iso_json=$(curl --silent --max-time 30 --request GET --user-agent "$user_agent" --referer "$url" --header "Accept:" --max-filesize 100K --fail --proto =https --tlsv1.2 --http1.1 -- "$iso_url")
iso_json=$(curl --silent --max-time 30 --request GET --user-agent "$user_agent" --referer "$url" --header "Accept:" --max-filesize 100K --fail --proto =https --tlsv1.2 --http1.1 -- "$iso_url") || {
handle_curl_error "$?" "Microsoft"
return $?
}

if ! [ "$iso_json" ]; then
# This should only happen if there's been some change to how this API works
Expand Down
2 changes: 1 addition & 1 deletion src/samba.sh
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ addShare() {
if [[ "$dir" == "$tmp" ]]; then

{ echo "--------------------------------------------------------"
echo " $APP for $ENGINE v$(</run/version)..."
echo " $APP for $ENGINE v$(</etc/version)..."
echo " For support visit $SUPPORT"
echo "--------------------------------------------------------"
echo ""
Expand Down