From e25612aa45254374677cf67adcceea1bb94565f4 Mon Sep 17 00:00:00 2001 From: whyour Date: Sun, 17 Dec 2023 18:03:37 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=87=E6=8D=A2=20linux=20?= =?UTF-8?q?=E9=95=9C=E5=83=8F=E6=BA=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- back/services/system.ts | 10 +++++----- src/pages/setting/dependence.tsx | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/back/services/system.ts b/back/services/system.ts index b557cda7..e4057ceb 100644 --- a/back/services/system.ts +++ b/back/services/system.ts @@ -218,15 +218,15 @@ export default class SystemService { ...oDoc, info: { ...oDoc.info, ...info }, }); - let defaultDomain = 'https://dl-cdn.alpinelinux.org'; - let targetDomain = 'https://dl-cdn.alpinelinux.org'; + let defaultDomain = 'http://deb.debian.org'; + let targetDomain = 'http://deb.debian.org'; if (os.platform() !== 'linux') { return; } - const content = await fs.promises.readFile('/etc/apk/repositories', { + const content = await fs.promises.readFile('/etc/apt/sources.list', { encoding: 'utf-8', }); - const domainMatch = content.match(/(http.*)\/alpine\/.*/); + const domainMatch = content.match(/(http.*)\/debian /); if (domainMatch) { defaultDomain = domainMatch[1]; } @@ -239,7 +239,7 @@ export default class SystemService { )}/${targetDomain.replace( /\//g, '\\/', - )}/g' /etc/apk/repositories && apk update -f`; + )}/g' /etc/apt/sources.list && apt update`; this.scheduleService.runTask( command, diff --git a/src/pages/setting/dependence.tsx b/src/pages/setting/dependence.tsx index dddc5557..71ae07e5 100644 --- a/src/pages/setting/dependence.tsx +++ b/src/pages/setting/dependence.tsx @@ -196,12 +196,12 @@ const Dependence = () => { { setSystemConfig({