mirror of
https://github.com/lnbits/lnbits-legend.git
synced 2024-11-19 09:54:21 +01:00
reintroduce signalhandler and ad encrypted macaroon
This commit is contained in:
parent
682a297422
commit
282ef34d11
@ -81,10 +81,10 @@ async def check_funding_source() -> None:
|
||||
|
||||
# original_sigint_handler = signal.getsignal(signal.SIGINT)
|
||||
|
||||
# def signal_handler(signal, frame):
|
||||
# logger.debug(f"SIGINT received, terminating LNbits.")
|
||||
# sys.exit(1)
|
||||
# signal.signal(signal.SIGINT, signal_handler)
|
||||
def signal_handler(signal, frame):
|
||||
logger.debug(f"SIGINT received, terminating LNbits.")
|
||||
sys.exit(1)
|
||||
signal.signal(signal.SIGINT, signal_handler)
|
||||
|
||||
WALLET = get_wallet_class()
|
||||
while True:
|
||||
@ -100,7 +100,7 @@ async def check_funding_source() -> None:
|
||||
pass
|
||||
logger.info("Retrying connection to backend in 5 seconds...")
|
||||
await asyncio.sleep(5)
|
||||
# signal.signal(signal.SIGINT, original_sigint_handler)
|
||||
signal.signal(signal.SIGINT, original_sigint_handler)
|
||||
logger.info(
|
||||
f"✔️ Backend {WALLET.__class__.__name__} connected and with a balance of {balance} msat."
|
||||
)
|
||||
|
@ -86,6 +86,7 @@ class Settings(BaseSettings):
|
||||
lnd_rest_endpoint: Optional[str] = Field(default=None)
|
||||
lnd_rest_cert: Optional[str] = Field(default=None)
|
||||
lnd_rest_macaroon: Optional[str] = Field(default=None)
|
||||
lnd_rest_macaroon_encrypted: Optional[str] = Field(default=None)
|
||||
lnpay_api_endpoint: Optional[str] = Field(default=None)
|
||||
lnpay_api_key: Optional[str] = Field(default=None)
|
||||
lnpay_wallet_key: Optional[str] = Field(default=None)
|
||||
|
Loading…
Reference in New Issue
Block a user