aboutsummaryrefslogtreecommitdiffhomepage
path: root/admin.go
diff options
context:
space:
mode:
Diffstat (limited to 'admin.go')
-rw-r--r--admin.go6
1 files changed, 6 insertions, 0 deletions
diff --git a/admin.go b/admin.go
index f33365750..da7ce0f58 100644
--- a/admin.go
+++ b/admin.go
@@ -39,6 +39,7 @@ import (
"sync"
"time"
+ "github.com/caddyserver/caddy/v2/notify"
"github.com/caddyserver/certmagic"
"github.com/prometheus/client_golang/prometheus"
"go.uber.org/zap"
@@ -905,6 +906,11 @@ func handleStop(w http.ResponseWriter, r *http.Request) error {
Err: fmt.Errorf("method not allowed"),
}
}
+
+ if err := notify.NotifyStopping(); err != nil {
+ Log().Error("unable to notify stopping to service manager", zap.Error(err))
+ }
+
exitProcess(Log().Named("admin.api"))
return nil
}