This commit is contained in:
musistudio
2025-12-25 23:01:52 +08:00
parent cd7454d7fb
commit fc60d3a9ec

View File

@@ -14,8 +14,6 @@ import { checkForUpdates, performUpdate } from "./update";
import { version } from "../../package.json"; import { version } from "../../package.json";
import { spawn } from "child_process"; import { spawn } from "child_process";
import { cleanupPidFile } from "./processCheck"; import { cleanupPidFile } from "./processCheck";
import fastifyStatic from "@fastify/static";
import {join} from "path";
// Function to interpolate environment variables in config values // Function to interpolate environment variables in config values
const interpolateEnvVars = (obj: any): any => { const interpolateEnvVars = (obj: any): any => {
@@ -185,13 +183,13 @@ export const run = async (args: string[] = []) => {
// Save the PID of the background process // Save the PID of the background process
writeFileSync(PID_FILE, process.pid.toString()); writeFileSync(PID_FILE, process.pid.toString());
// server.app.post('/api/update/perform', async () => { server.app.post('/api/update/perform', async () => {
// return await performUpdate(); return await performUpdate();
// }) })
//
// server.app.get('/api/update/check', async () => { server.app.get('/api/update/check', async () => {
// return await checkForUpdates(version); return await checkForUpdates(version);
// }) })
server.app.post("/api/restart", async () => { server.app.post("/api/restart", async () => {
setTimeout(async () => { setTimeout(async () => {