Skip to content

Commit

Permalink
do not stop pppd unless af is not specified in PPPoEInterfacePlugin.f…
Browse files Browse the repository at this point in the history
…lushIP
jasonlyc committed Feb 18, 2024
1 parent 83844a2 commit b50d2d8
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions plugins/interface/pppoe_intf_plugin.js
Original file line number Diff line number Diff line change
@@ -39,9 +39,12 @@ class PPPoEInterfacePlugin extends InterfaceBasePlugin {
await exec(`sudo cp ${r.getFireRouterHome()}/scripts/firerouter_pppd@.service /etc/systemd/system/`);
}

async flushIP() {
await exec(`sudo systemctl stop firerouter_pppd@${this.name}`).catch((err) => {});
await exec(`rm -f ${this._getConfFilePath()}`).catch((err) => {});
async flushIP(af = null) {
if (!af) {
await exec(`sudo systemctl stop firerouter_pppd@${this.name}`).catch((err) => {});
await exec(`rm -f ${this._getConfFilePath()}`).catch((err) => {});
} else
await super.flushIP(af);
}

isWAN() {

0 comments on commit b50d2d8

Please sign in to comment.