diff --git a/pwnagotchi/plugins/__init__.py b/pwnagotchi/plugins/__init__.py index 2ffd21c..08d0b76 100644 --- a/pwnagotchi/plugins/__init__.py +++ b/pwnagotchi/plugins/__init__.py @@ -44,6 +44,8 @@ def toggle_plugin(name, enable=True): global loaded, database if pwnagotchi.config: + if not name in pwnagotchi.config['main']['plugins']: + pwnagotchi.config['main']['plugins'][name] = dict() pwnagotchi.config['main']['plugins'][name]['enabled'] = enable save_config(pwnagotchi.config, '/etc/pwnagotchi/config.toml')