Skip to content

Commit

Permalink
fix: add system user creation in arch package
Browse files Browse the repository at this point in the history
- Add systemd-sysusers configuration to create modbus-relay user
- Add user to uucp group for serial port access
- Update PKGBUILD to install sysusers configuration
  • Loading branch information
aljen committed Dec 3, 2024
1 parent 9d0dd38 commit 3172062
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions dist/arch/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ package() {
# Systemd service
install -Dm644 "dist/arch/modbus-relay.service" "$pkgdir/usr/lib/systemd/system/$pkgname.service"

# Systemd sysusers
install -Dm644 "dist/arch/modbus-relay.sysusers" "$pkgdir/usr/lib/sysusers.d/$pkgname.conf"

# Documentation
install -Dm644 "README.md" "$pkgdir/usr/share/doc/$pkgname/README.md"
install -Dm644 "LICENSE-MIT" "$pkgdir/usr/share/licenses/$pkgname/LICENSE-MIT"
Expand Down
3 changes: 3 additions & 0 deletions dist/arch/modbus-relay.sysusers
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Create modbus-relay system user and add to uucp group
u modbus-relay - "Modbus TCP to RTU relay service" /nonexistent /usr/sbin/nologin
m modbus-relay uucp

0 comments on commit 3172062

Please sign in to comment.