mirror of
https://github.com/aljazceru/lspd.git
synced 2025-12-24 01:04:21 +01:00
automation
This commit is contained in:
21
cln_plugin/cmd/main.go
Normal file
21
cln_plugin/cmd/main.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
"os/signal"
|
||||
"syscall"
|
||||
|
||||
"github.com/breez/lspd/cln_plugin"
|
||||
)
|
||||
|
||||
func main() {
|
||||
plugin := cln_plugin.NewClnPlugin(os.Stdin, os.Stdout)
|
||||
c := make(chan os.Signal, 1)
|
||||
signal.Notify(c, syscall.SIGINT, syscall.SIGTERM)
|
||||
go func() {
|
||||
<-c
|
||||
// Stop everything gracefully on stop signal
|
||||
plugin.Stop()
|
||||
}()
|
||||
plugin.Start()
|
||||
}
|
||||
Reference in New Issue
Block a user