mirror of
https://github.com/koush/scrypted.git
synced 2026-09-16 00:30:38 +01:00
cloud: refresh cached cloudflared binary (#2125)
This commit is contained in:
@@ -6,13 +6,13 @@ import { httpFetch } from '../../../server/src/fetch/http-fetch';
|
||||
|
||||
export async function installCloudflared() {
|
||||
const pluginVolume = process.env.SCRYPTED_PLUGIN_VOLUME;
|
||||
const version = 5;
|
||||
const version = 6;
|
||||
const cloudflareD = path.join(pluginVolume, 'cloudflare.d', `v${version}`, `${process.platform}-${process.arch}`);
|
||||
const bin = path.join(cloudflareD, cloudflared.bin);
|
||||
|
||||
if (!fs.existsSync(bin)) {
|
||||
for (let i = 0; i <= version; i++) {
|
||||
const cloudflareD = path.join(pluginVolume, 'cloudflare.d', `v${version}`);
|
||||
const cloudflareD = path.join(pluginVolume, 'cloudflare.d', `v${i}`);
|
||||
rmSync(cloudflareD, {
|
||||
force: true,
|
||||
recursive: true,
|
||||
|
||||
Reference in New Issue
Block a user