Skip to content

Commit

Permalink
Merge pull request #193 from xmidt-org/add-ipk
Browse files Browse the repository at this point in the history
feat: Add IPK support.
  • Loading branch information
schmidtw authored Jul 15, 2024
2 parents 7e28f22 + 34017cf commit a22907f
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 0 deletions.
28 changes: 28 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
---
project_name: xmidt-agent

version: 2

changelog:
use: github
Expand Down Expand Up @@ -71,6 +72,33 @@ archives:
format: zip
name_template: '{{ .ProjectName }}-{{ .Version }}-{{ .Os }}-{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'

nfpms:
-
vendor: xmidt-org
homepage: https://github.com/xmidt-org/xmidt-agent
license: Apache-2.0
maintainer: [email protected]
description: The client agent for the Xmidt service.

formats:
- ipk

dependencies:
- systemd

contents:
# systemd service file
- src: .release/ipk/xmidt-agent.service
dst: /usr/lib/systemd/system/xmidt-agent.service

# base configuration file
- src: .release/ipk/config.yml
dst: /etc/xmidt-agent/01-config.yml

ipk:
fields:
Bugs: https://github.com/xmidt-org/xmidt-agent/issues

source:
enabled: true
name_template: '{{ .ProjectName }}_{{ .Version }}_src'
Expand Down
8 changes: 8 additions & 0 deletions .release/ipk/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# SPDX-FileCopyrightText: 2024 Comcast Cable Communications Management, LLC
# SPDX-License-Identifier: Apache-2.0
#
# Put any configuration values that should always be present here.
#
# Note:
# These values should be generic and apply to all consumers (openwrt, rdk, etc)
---
22 changes: 22 additions & 0 deletions .release/ipk/xmidt-agent.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# SPDX-FileCopyrightText: 2024 Comcast Cable Communications Management, LLC
# SPDX-License-Identifier: Apache-2.0

[Unit]
Description=The client agent for the Xmidt service.
After=network.target remote-fs.target nss-lookup.target

[Service]
User=xmidt-agent
Group=xmidt-agent
SyslogIdentifier=xmidt-agent
PIDFile=/run/xmidt-agent.pid
ExecStartPre=/usr/bin/rm -f /run/xmidt-agent.pid
ExecStart=/usr/bin/xmidt-agent
Type=simple
ExecReload=/bin/kill -s HUP $MAINPID
KillMode=process
PrivateTmp=true
Restart=always

[Install]
WantedBy=multi-user.target

0 comments on commit a22907f

Please sign in to comment.