Files
panel/internal/apps/openresty/app.go
T
2026-08-15 08:33:30 +08:00

29 lines
482 B
Go

package openresty
import (
"github.com/go-chi/chi/v5"
"github.com/acepanel/panel/v3/internal/apps/nginx"
"github.com/acepanel/panel/v3/pkg/systemctl"
"github.com/acepanel/panel/v3/pkg/types"
)
type App struct {
nginx *nginx.App
}
func NewApp(nginxApp *nginx.App) *App {
return &App{
nginx: nginxApp,
}
}
func (s *App) Route(r chi.Router) {
s.nginx.Route(r)
}
func (s *App) Status() string {
ok, _ := systemctl.Status("nginx")
return types.AggregateAppStatus(ok)
}