*Move ssl start logic to its own start function
This commit is contained in:
parent
e2ccfa5220
commit
650666515b
|
@ -9,7 +9,6 @@ import { overwriteRegistryEntry } from "libskynetnode";
|
|||
import type { DnsProvider } from "@lumeweb/relay-types";
|
||||
// @ts-ignore
|
||||
import { hashDataKey } from "@lumeweb/kernel-utils";
|
||||
import { getSslCheck } from "./ssl";
|
||||
|
||||
let activeIp: string;
|
||||
const REGISTRY_NODE_KEY = "lumeweb-dht-node";
|
||||
|
@ -53,9 +52,6 @@ export async function start() {
|
|||
);
|
||||
|
||||
cron.schedule("0 * * * *", ipUpdate);
|
||||
if (config.bool("ssl") && getSslCheck()) {
|
||||
await getSslCheck()();
|
||||
}
|
||||
}
|
||||
|
||||
async function getCurrentIp(): Promise<string> {
|
||||
|
|
|
@ -143,3 +143,9 @@ export function setSSlCheck(checker: () => Promise<void>): void {
|
|||
export function getSslCheck(): () => Promise<void> {
|
||||
return sslChecker;
|
||||
}
|
||||
|
||||
export async function start() {
|
||||
if (config.bool("ssl") && getSslCheck()) {
|
||||
await getSslCheck()();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue