First commit
This commit is contained in:
commit
4492d02b10
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
work
|
24
Makefile
Normal file
24
Makefile
Normal file
@ -0,0 +1,24 @@
|
||||
# Created by: johan <johan@nosd.in>
|
||||
# net-mgmt/glapi/Makefile 2023-08-18 09:11:42Z
|
||||
|
||||
PORTNAME= glapi
|
||||
PORTVERSION= 0.5.6
|
||||
DISTVERSIONPREFIX=v
|
||||
CATEGORIES= net-mgmt
|
||||
|
||||
MAINTAINER= johan@nosd.in
|
||||
COMMENT= Go LDAP API is an HTTP API to LDAP backend
|
||||
WWW= https://git.nosd.in/yo/glapi/archive/
|
||||
|
||||
LICENSE= BSD3CLAUSE
|
||||
|
||||
USES= go:modules
|
||||
GO_MODULE= git.nosd.in/yo/glapi
|
||||
|
||||
PLIST_FILES= bin/glapi
|
||||
USE_RC_SUBR= glapi
|
||||
|
||||
post-install:
|
||||
${INSTALL_DATA} ${WRKSRC}/glapi.env.sample ${PREFIX}/etc/glapi.env.sample
|
||||
|
||||
.include <bsd.port.mk>
|
5
distinfo
Normal file
5
distinfo
Normal file
@ -0,0 +1,5 @@
|
||||
TIMESTAMP = 1692458165
|
||||
SHA256 (go/net-mgmt_glapi/glapi-v0.5.6/v0.5.6.mod) = 5ec44ec116eec0a0cacd40fa38f5f710e7c3d8eb837f555bf80e6488c3ea49e8
|
||||
SIZE (go/net-mgmt_glapi/glapi-v0.5.6/v0.5.6.mod) = 1847
|
||||
SHA256 (go/net-mgmt_glapi/glapi-v0.5.6/v0.5.6.zip) = 237e439a46d639f86d0320d481d879a3d441374ea22f8528df1f9b5f1a5a10e0
|
||||
SIZE (go/net-mgmt_glapi/glapi-v0.5.6/v0.5.6.zip) = 31768
|
58
files/glapi.in
Normal file
58
files/glapi.in
Normal file
@ -0,0 +1,58 @@
|
||||
#!/bin/sh
|
||||
|
||||
# PROVIDE: glapi
|
||||
# REQUIRE: LOGIN
|
||||
# KEYWORD: shutdown
|
||||
#
|
||||
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
|
||||
# to enable this service:
|
||||
#
|
||||
# glapi_enable (bool): Set to NO by default.
|
||||
# Set it to YES to enable glapi.
|
||||
# glapi_user (string): Set user that glapi will run under
|
||||
# Default is "nobody".
|
||||
# glapi_group (string): Set group that glapi will run under
|
||||
# Default is "nobody".
|
||||
# glapi_args (string): Set extra arguments to pass to glapi
|
||||
# Default is "".
|
||||
# glapi_config (string): Set glapi configuration file
|
||||
# Default is "/usr/local/etc/glapi.env".
|
||||
# glapi_listen_address (string):Set ip:port that glapi will listen on
|
||||
# Default is ":8080".
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name=glapi
|
||||
rcvar=glapi_enable
|
||||
|
||||
load_rc_config $name
|
||||
|
||||
: ${glapi_enable:="NO"}
|
||||
: ${glapi_user:="nobody"}
|
||||
: ${glapi_group:="nobody"}
|
||||
: ${glapi_args:=""}
|
||||
: ${glapi_config:="/usr/local/etc/glapi.env"}
|
||||
: ${glapi_listen_address:=":8080"}
|
||||
: ${glapi_restart_delay:=3}
|
||||
|
||||
pidfile=/var/run/glapi.pid
|
||||
command="/usr/sbin/daemon"
|
||||
glapi_command="%%PREFIX%%/bin/glapi"
|
||||
command_args="-rP ${pidfile} -S -R ${glapi_restart_delay} \
|
||||
-T ${name} ${glapi_command} \
|
||||
-config ${glapi_config} \
|
||||
-listen-addr ${glapi_listen_address} \
|
||||
${glapi_args}"
|
||||
required_files="${glapi_config}"
|
||||
|
||||
start_precmd=glapi_startprecmd
|
||||
|
||||
glapi_startprecmd()
|
||||
{
|
||||
if [ ! -e ${pidfile} ]; then
|
||||
install -o ${glapi_user} -g ${glapi_group} /dev/null ${pidfile};
|
||||
fi
|
||||
}
|
||||
|
||||
load_rc_config $name
|
||||
run_rc_command "$1"
|
Loading…
Reference in New Issue
Block a user