mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 09:54:16 +01:00
279b3aa7e8
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
18 lines
371 B
Python
Executable File
18 lines
371 B
Python
Executable File
#!/usr/bin/env python3
|
|
from pyln.client import Plugin
|
|
import sys
|
|
|
|
|
|
plugin = Plugin()
|
|
|
|
|
|
@plugin.subscribe("*")
|
|
def on_any_notification(request, **kwargs):
|
|
plugin.log("notification {}: {}".format(request.method, kwargs))
|
|
if request.method == 'shutdown':
|
|
# A plugin which subscribes to shutdown is expected to exit itself.
|
|
sys.exit(0)
|
|
|
|
|
|
plugin.run()
|