aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorRahiel Kasim <rahiel@protonmail.ch>2016-01-06 21:53:08 +0100
committerRahiel Kasim <rahiel@protonmail.ch>2016-01-06 21:53:08 +0100
commit83b51ed4a2ce04a30be0b4edf2e85a243264224b (patch)
tree21591cb7b83e15fd158fe1dcaac7abd252cdd847
parentf0723d0c255ffe41ab6a7ca2ca06f435be2ede5e (diff)
remove uninstalled programs from the config, update readme
-rw-r--r--README.md9
-rw-r--r--firectl.py8
2 files changed, 11 insertions, 6 deletions
diff --git a/README.md b/README.md
index 8af3b34..1cea999 100644
--- a/README.md
+++ b/README.md
@@ -1,10 +1,9 @@
-firectl
+Firectl
=======
-Firectl is a tool to integrate
-[firejail](https://l3net.wordpress.com/projects/firejail/) sandboxing in the
-Linux desktop. Enable firejail for an application and enjoy a more secure
-desktop.
+Firectl is a tool to integrate [firejail](https://firejail.wordpress.com/)
+sandboxing in the Linux desktop. Enable firejail for an application and enjoy a
+more secure desktop.
# Usage
diff --git a/firectl.py b/firectl.py
index 9208a2f..b7285a4 100644
--- a/firectl.py
+++ b/firectl.py
@@ -1,5 +1,5 @@
# -*- coding: utf-8 -*-
-__version__ = "0.2.4"
+__version__ = "0.2.5"
import os
from difflib import get_close_matches
@@ -179,5 +179,11 @@ def status():
def restore():
"""Re-enable firejail profiles for when desktop files get updated."""
header, conf = get_config()
+
+ # clean config from enabled programs removed from the system
+ removed = [c for c in conf if c not in installed]
+ remove_config(removed)
+ [conf.remove(c) for c in removed]
+
if len(conf) > 0:
enable.callback(conf, update_config=False)