Skip to content

Commit

Permalink
v2.3.0: Proper shutdown of flatpak internet applications when VPN is …
Browse files Browse the repository at this point in the history
…closed (linuxmint#6687)
  • Loading branch information
claudiux authored Dec 15, 2024
1 parent 0210306 commit 5822f6b
Show file tree
Hide file tree
Showing 4 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### 2.3.0~20241215
* Proper shutdown of flatpak internet applications when VPN is closed.

### v2.2.3~20240726
* Solves dependency problem.

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ But also, it can:

* try to restart the VPN link when it shuts down incidentally,

* close the VPN-related apps (like Transmission, qBittorrent, Deluge...) when your VPN shuts down, and restart them when your VPN link becomes active again,
* close the VPN-related apps (like Transmission, qBittorrent, Deluge..., also flakpak ones) when your VPN shuts down, and restart them when your VPN link becomes active again,

* quickly close a VPN-related app if it is started when the VPN is idle.

Expand Down
9 changes: 9 additions & 0 deletions VPN-Sentinel@claudiux/files/VPN-Sentinel@claudiux/applet.js
Original file line number Diff line number Diff line change
Expand Up @@ -639,6 +639,15 @@ class VPNSentinel extends Applet.TextIconApplet {

async super_kill(app) {
let app_name = app.get_name();
let isFlatpak = app.get_is_flatpak();

if (isFlatpak) {
let flatpakId = app.get_flatpak_app_id();
Util.spawnCommandLineAsync("flatpak kill "+flatpakId);
this.activityLog.log(_("%s has just been stopped.").format(""+app_name));
return
}

let kw = this.keyword_for_pkill(app);
let result = killall(kw);
if (result) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"uuid": "VPN-Sentinel@claudiux",
"max-instances": "1",
"name": "VPN Sentinel",
"version": "2.2.3",
"version": "2.3.0",
"hide-configuration": false,
"description": "VPN Sentinel is a powerful applet that monitors the VPN (or Wireguard) link, displays its status, can automatically connect to the last used VPN, reconnect the VPN link in case of unexpected disconnection, and start or stop certain Internet applications depending on the VPN status.",
"author": "claudiux"
Expand Down

0 comments on commit 5822f6b

Please sign in to comment.