mirror of
https://github.com/0xJacky/nginx-ui.git
synced 2025-05-11 02:15:48 +02:00
fix: catch process termination signal to clear socket file
This commit is contained in:
parent
96dfbd0025
commit
94ca26d0ea
1 changed files with 2 additions and 2 deletions
4
main.go
4
main.go
|
@ -6,8 +6,8 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"net"
|
"net"
|
||||||
"net/http"
|
"net/http"
|
||||||
"os"
|
|
||||||
"os/signal"
|
"os/signal"
|
||||||
|
"syscall"
|
||||||
|
|
||||||
"code.pfad.fr/risefront"
|
"code.pfad.fr/risefront"
|
||||||
"github.com/0xJacky/Nginx-UI/internal/kernel"
|
"github.com/0xJacky/Nginx-UI/internal/kernel"
|
||||||
|
@ -69,7 +69,7 @@ func main() {
|
||||||
|
|
||||||
settings.Init(confPath)
|
settings.Init(confPath)
|
||||||
|
|
||||||
ctx, cancel := signal.NotifyContext(context.Background(), os.Interrupt)
|
ctx, cancel := signal.NotifyContext(context.Background(), syscall.SIGINT, syscall.SIGTERM)
|
||||||
defer cancel()
|
defer cancel()
|
||||||
|
|
||||||
err := risefront.New(ctx, risefront.Config{
|
err := risefront.New(ctx, risefront.Config{
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue