MCPcopy Create free account
hub / github.com/TeleBoxOrg/TeleBox_Plugins / validatePath

Function validatePath

ssh/ssh.ts:40–48  ·  view source on GitHub ↗
(pathStr: string)

Source from the content-addressed store, hash-verified

38}
39
40async function saveIptablesRules(): Promise<void> {
41 try {
42 const { stdout } = await execFileAsync("iptables-save", []);
43 fs.mkdirSync("/etc/iptables", { recursive: true });
44 fs.writeFileSync("/etc/iptables/rules.v4", stdout, "utf8");
45 return;
46 } catch (error) {
47 try {
48 await execFileAsync("service", ["iptables", "save"]);
49 return;
50 } catch {
51 throw error;

Callers 1

generateSSHKeysMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected