We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents f3f04f6 + 453cfda commit b3020f7Copy full SHA for b3020f7
plugins/upnp/upnp_plugin.js
@@ -83,6 +83,11 @@ class UPnPPlugin extends Plugin {
83
const allowNetworks = internalNetworks.map(n => `allow 1024-65535 ${n} 1024-65535`);
84
content = content.replace(/%ALLOW_NETWORK%/g, allowNetworks.join("\n"));
85
await fs.writeFileAsync(this._getConfigFilePath(), content, {encoding: 'utf8'});
86
+
87
+ // delete lease file on turning off
88
+ if (!upnpEnabled) {
89
+ await exec(`sudo rm /var/run/upnp.${this.name}.leases`)
90
+ }
91
}
92
93
async apply() {
0 commit comments