Skip to content

Commit

Permalink
Merge branch 'dn2_int' into unstable
Browse files Browse the repository at this point in the history
  • Loading branch information
davidnewhall committed Jul 22, 2024
2 parents 5d0d7fa + 573e673 commit e90705f
Show file tree
Hide file tree
Showing 4 changed files with 26 additions and 0 deletions.
7 changes: 7 additions & 0 deletions init/docker/hooks/build
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ source settings.sh

docker buildx inspect

mkdir -p ~/.ssh
ssh-keyscan github.com >> ~/.ssh/known_hosts
echo "${SUPERSECRET}" >> ~/.ssh/private_id
ssh-add ~/.ssh/private_id
git clone [email protected]:Notifiarr/private.git
cp private/*.go pkg/private/

if ! (docker buildx inspect | grep -Eq 'docker-container'); then
echo "Creating docker builder instance"
docker buildx create --use
Expand Down
1 change: 1 addition & 0 deletions pkg/private/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
*.go
16 changes: 16 additions & 0 deletions pkg/private/private.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package private

//nolint:gochecknoglobals
var (
kind = "custom"
from = "internal"
)

type Output struct {
Kind string `json:"kind"`
From string `json:"from"`
}

func Info() any {
return &Output{Kind: kind, From: from}
}
2 changes: 2 additions & 0 deletions pkg/website/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (

"github.com/Notifiarr/notifiarr/pkg/apps"
"github.com/Notifiarr/notifiarr/pkg/mnd"
"github.com/Notifiarr/notifiarr/pkg/private"
"github.com/shirou/gopsutil/v4/host"
"golift.io/cnfg"
)
Expand Down Expand Up @@ -127,6 +128,7 @@ func (s *Server) sendPayload(ctx context.Context, uri string, payload interface{
if err == nil {
var torn map[string]interface{}
if err := json.Unmarshal(data, &torn); err == nil {
torn["private"] = private.Info()
if torn["host"], err = s.GetHostInfo(ctx); err != nil {
s.Config.Errorf("Host Info Unknown: %v", err)
}
Expand Down

0 comments on commit e90705f

Please sign in to comment.