Skip to content

Commit

Permalink
feat: Add IPK support.
Browse files Browse the repository at this point in the history
  • Loading branch information
schmidtw committed Jul 15, 2024
1 parent 7e28f22 commit ff26d13
Show file tree
Hide file tree
Showing 3 changed files with 52 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
5 changes: 5 additions & 0 deletions .release/ipk/config.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Put any configuration values that should always be present here.
#
# Note:
# These values should be generic and apply to all consumers (openwrt, rdk, etc)
---
19 changes: 19 additions & 0 deletions .release/ipk/xmidt-agent.service
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
[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 ff26d13

Please sign in to comment.