Skip to content

Commit

Permalink
sysutils/nmdaemon: add new port
Browse files Browse the repository at this point in the history
This is a daemon that manages network configuration of FreeBSD.

The daemon can manage:
 - some system network parameters
 - interfaces
 - routes
 - wireless networks (using wpa_supplicant)

nmdaemon should be started as root, it opens a unix socket where
clients can connect. The permissions of the unix socket are managed
by nmdaemon and provided by it's configuration file.

To communicate with nmdaemon one should use JSON formatted commands,
nmdaemon answers with JSON formatted data too.
The syntax and examples of the commands can be found in commands.md.

The Makefile and pkg-descr files have been made compliant with
FreeBSD conventions by me (pkg-descr is derived from README.md).

Pull Request:	#224
  • Loading branch information
Peter2121 authored and stesser committed Jan 28, 2024
1 parent 43dba02 commit 6f4d9e4
Show file tree
Hide file tree
Showing 5 changed files with 47 additions and 0 deletions.
1 change: 1 addition & 0 deletions sysutils/Makefile
Expand Up @@ -824,6 +824,7 @@
SUBDIR += nfcutils
SUBDIR += nitrogen
SUBDIR += nix
SUBDIR += nmdaemon
SUBDIR += nmrpflash
SUBDIR += no-login
SUBDIR += node_exporter
Expand Down
23 changes: 23 additions & 0 deletions sysutils/nmdaemon/Makefile
@@ -0,0 +1,23 @@
PORTNAME= nmdaemon
DISTVERSIONPREFIX= v
DISTVERSION= 0.2
CATEGORIES= sysutils

MAINTAINER= peter@flytrace.com
COMMENT= FreeBSD network manager daemon
WWW= https://github.com/Peter2121/nmdaemon

LICENSE= BSD3CLAUSE
LICENSE_FILE= ${WRKSRC}/LICENSE

BUILD_DEPENDS= ${LOCALBASE}/lib/libasync++.a:devel/asyncplusplus \
${LOCALBASE}/lib/libsockpp.a:net/libsockpp

USES= cmake compiler:c++20-lang
USE_GITHUB= yes
GH_ACCOUNT= Peter2121
GH_PROJECT= nmdaemon

CONFIGURE_ENV= VERSION=${DISTVERSION}

.include <bsd.port.mk>
3 changes: 3 additions & 0 deletions sysutils/nmdaemon/distinfo
@@ -0,0 +1,3 @@
TIMESTAMP = 1706385613
SHA256 (Peter2121-nmdaemon-v0.2_GH0.tar.gz) = ffd1dbbbed96c16b2d737f540b8a68e3df04a91546ba72355d5558803ac79f5a
SIZE (Peter2121-nmdaemon-v0.2_GH0.tar.gz) = 247518
15 changes: 15 additions & 0 deletions sysutils/nmdaemon/pkg-descr
@@ -0,0 +1,15 @@
This is a daemon that manages network configuration of FreeBSD.

The daemon can manage:
- some system network parameters
- interfaces
- routes
- wireless networks (using wpa_supplicant)

nmdaemon should be started as root, it opens a unix socket where
clients can connect. The permissions of the unix socket are managed
by nmdaemon and provided by it's configuration file.

To communicate with nmdaemon one should use JSON formatted commands,
nmdaemon answers with JSON formatted data too.
The syntax and examples of the commands can be found in commands.md.
5 changes: 5 additions & 0 deletions sysutils/nmdaemon/pkg-plist
@@ -0,0 +1,5 @@
bin/nmdaemon
@sample etc/nmdaemon.conf.sample
etc/rc.d/nmdaemon
%%DATADIR%%/commands.md
%%DATADIR%%/commands.txt

0 comments on commit 6f4d9e4

Please sign in to comment.