How to use conky to kill an application if VPN drops

  • First, you need to identify the network interface:

$ ifconfig
The output should look like this:
eth0
lo
tun0
  • Second, you need to identify the application name; you can check in the System Monitor[gnome-system-monitor] or with the top command.

  • Third, you need to edit the conkyrc by adding this lines:
For conky without VPN status/hidden:
${if_up tun0}${else}${exec killall transmission-gtk}$endif
For conky with VPN status:
${if_up tun0}${color #66BF60}VPN$color${else}${color #FF6640}VPN$color${exec killall transmission-gtk}$endif

Revisions

01/10/2012 - 02:06
teodorescup
03/21/2014 - 08:33
lembas