citadel-core/karen
Aaron Dewes 8bcb66f0fa
Citadel 0.1.8 (#90)
* Move LND into an app

* Add JWT pubkey module

* Remove old LND dir

* Clean up

* Some cleanups

* WIP: LND app

* Clean up output of ls-installed

* Clean up app system

* Various cleanups

* Fix volume name

* Update dependencies.yml

* Update app-manager

* Fix some minor issues

* Update manager

* Some fixes for the LND app

* Some fixes

* WIP: Caddy

* WIP: More https

* Caddy improvements

* Some more fixes

* Fix caddy port

* Fix for LND app

* Fixes for some apps

* Code cleanups

* Fix entry name

* Fix python

* Update app-manager

* Some Caddy fixes

* Update app-manager

* Fix tor

* Fix Caddy

* Fix caddy

* Minor fix

* Fix

* Fix https

* Update dependencies.yml

* Fix for CLN (#1)

* Update dependencies.yml

* Fix Caddyfile

* Expose IP address to manager

* Update API

* Use API from Docker Hub

* Update dependencies.yml

* Update dependencies.yml

* Update dependencies.yml

* Some fixes

* Minor syntax fix

* How did I even do that?

* Update docker-compose.yml

* Allow restarting Caddy

* Add configure trigger

* Replace configure with a caddy config update

* Update dependencies.yml

* Update Tor

* Update dependencies.yml

* Update dependencies.yml

* Update dependencies.yml

* Latest dashboard

* Move to ghcr.io

* Update 01-run.sh

* Update 01-run.sh

* Update 01-run.sh

* Update dependencies.yml

* Clean up

* Fix mount

* Update mount

* Create .gitkeep

* Dynamic caddy updates

* Update app-cli

* Update dependencies.yml

* Update dependencies.yml

* Remove Lightning logs from debug script

* Update app manager

* Clean up

* Update app-cli

* Citadel 0.1.8

* Remove host gateway
2023-04-16 21:12:12 +02:00

35 lines
899 B
Python
Executable File

#!/usr/bin/env python3
# SPDX-FileCopyrightText: 2022 Citadel and contributors
#
# SPDX-License-Identifier: GPL-3.0-or-later
import os
import socket
rootDir = os.path.dirname(os.path.abspath(__file__))
os.chdir(rootDir)
if os.path.exists("events/karen.socket"):
os.remove("events/karen.socket")
server = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM)
server.bind("events/karen.socket")
while True:
server.listen(1)
conn, addr = server.accept()
datagram = conn.recv(1024)
if datagram:
instructions = datagram.decode("utf-8").strip().split()
cmd = instructions[0]
if cmd == "trigger":
trigger = instructions[1]
instructions.pop(0)
instructions.pop(0)
os.system("scripts/triggers/{} {}".format(trigger, " ".join(instructions)))
elif cmd == "exec":
instructions.pop(0)
os.system(" ".join(instructions))
conn.close()