Add the first SamDrucker client.

SamDrucker is a collection of small components which create a centralized list
of all packages on all hosts.

samdruckerclientshell is a small client shell, installed on a host, which
submits package information to the SamDrucker host you have already
configured.
This commit is contained in:
Dan Langille 2020-01-11 21:20:13 +00:00
parent 9b5e8a6fd1
commit a4609d4be8
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=522711
7 changed files with 86 additions and 0 deletions

View file

@ -1172,6 +1172,7 @@
SUBDIR += safe-rm
SUBDIR += safecat
SUBDIR += safecopy
SUBDIR += samdruckerclientshell
SUBDIR += samefile
SUBDIR += samesame
SUBDIR += sample

View file

@ -0,0 +1,34 @@
# $FreeBSD$
PORTNAME= SamDruckerClientShell
PORTVERSION= 0.0.1
CATEGORIES= sysutils
MASTER_SITES= GH
MAINTAINER= dan@langille.org
COMMENT= Client for sending package information to SamDrucker
LICENSE= BSD2CLAUSE
LICENSE_FILE= LICENSE
USE_GITHUB= yes
GH_ACCOUNT= dlangille
GH_PROJECT= SamDrucker
NO_BUILD= YES
SUB_FILES= 999-samdrucker-client samdrucker.conf.sample
RUN_DEPENDS+= curl>0:ftp/curl
RUN_DEPENDS+= jo>0:textproc/jo
.include <bsd.port.pre.mk>
do-install:
${MKDIR} ${STAGEDIR}${PREFIX}/etc/periodic/daily
${MKDIR} ${STAGEDIR}${PREFIX}/etc/samdrucker
${INSTALL_SCRIPT} ${WRKSRC}/clients/samdrucker.sh ${STAGEDIR}${PREFIX}/bin
${INSTALL_SCRIPT} ${WRKDIR}/999-samdrucker-client ${STAGEDIR}${PREFIX}/etc/periodic/daily
${INSTALL_DATA} ${WRKDIR}/samdrucker.conf.sample ${STAGEDIR}${PREFIX}/etc/samdrucker
.include <bsd.port.post.mk>

View file

@ -0,0 +1,3 @@
TIMESTAMP = 1578775942
SHA256 (dlangille-SamDrucker-0.0.1_GH0.tar.gz) = 1d75bfebd8f446ad9c75823a5de87895e713033bdee95efe20538bbf927875ed
SIZE (dlangille-SamDrucker-0.0.1_GH0.tar.gz) = 6107

View file

@ -0,0 +1,25 @@
#!/bin/sh -
#
# $FreeBSD$
#
if [ -r /etc/defaults/periodic.conf ]; then
. /etc/defaults/periodic.conf
source_periodic_confs
fi
rc=0
case "${samdrucker_client_enable:-YES}" in
[Yy][Ee][Ss])
anticongestion
if ! %%PREFIX%%/bin/samdrucker.sh ; then
echo 'ouch, something went wrong with /usr/local/bin/samdrucker.sh'
rc=2
fi
;;
*)
;;
esac
exit $rc

View file

@ -0,0 +1,2 @@
SAMDRUCKER_URL="https://samdrucker.example.org/samdrucker.php"
SAMDRUCKER_ARG="packages"

View file

@ -0,0 +1,15 @@
Sample client for SamDrucker, which will store lists of packages installed on
hosts.
SamDrucker is a collection of small components which create a centralized list
of all packages on all hosts.
Each component is designed to be:
* small
* simple
* easily written
* flexiable
* few, if any, dependencies
WWW: https://github.com/dlangille/SamDrucker

View file

@ -0,0 +1,6 @@
bin/samdrucker.sh
etc/periodic/daily/999-samdrucker-client
@sample etc/samdrucker/samdrucker.conf.sample
@dir etc/periodic/daily
@dir etc/samdrucker