diff --git a/sysutils/cbsd-mq-api/Makefile b/sysutils/cbsd-mq-api/Makefile index 151784dfc8a3..6ccb8fd12b88 100644 --- a/sysutils/cbsd-mq-api/Makefile +++ b/sysutils/cbsd-mq-api/Makefile @@ -1,34 +1,36 @@ PORTNAME= cbsd-mq-api -PORTVERSION= 0.3 -PORTREVISION= 22 +PORTVERSION= 0.4 CATEGORIES= sysutils MAINTAINER= olevole@olevole.ru COMMENT= Simplified API for creating and destroying CBSD virtual environments -WWW= https://www.bsdstore.ru/ +WWW= https://github.com/cbsd/cbsd-mq-api LICENSE= BSD2CLAUSE USES= go USE_GITHUB= yes GH_ACCOUNT= cbsd -GH_TUPLE= beanstalkd:go-beanstalk:3bed00be7a17:beanstalkd/src/github.com/beanstalkd/go-beanstalk \ - gorilla:mux:d07530f46e1e:gorilla_mux/vendor/github.com/gorilla/mux \ - golang:crypto:5ff15b29337e:golang_crypto/vendor/golang.org/x/crypto +GH_TUPLE= beanstalkd:go-beanstalk:52e4a01:beanstalkd/src/github.com/beanstalkd/go-beanstalk \ + gorilla:mux:v1.8.1:gorilla_mux/vendor/github.com/gorilla/mux \ + golang:crypto:v0.30.0:golang_crypto/vendor/golang.org/x/crypto + USE_RC_SUBR= cbsd-mq-api USERS= cbsd GROUPS= cbsd PLIST_FILES= bin/cbsd-mq-api \ - "@sample etc/cbsd-mq-api.json.sample" + "@sample etc/cbsd-mq-api.json.sample" \ + "@sample etc/cbsd_api_cloud_images.json.sample" post-extract: ${LN} -sf ${WRKSRC}/src ${WRKDIR} ${LN} -sf ${WRKSRC} ${WRKDIR}/src/${PORTNAME} do-install: ${INSTALL_PROGRAM} ${WRKDIR}/bin/${PORTNAME} ${STAGEDIR}${PREFIX}/bin/cbsd-mq-api ${INSTALL_DATA} ${WRKDIR}/${PORTNAME}-${GH_TAGNAME}/etc/cbsd-mq-api.json ${STAGEDIR}${PREFIX}/etc/cbsd-mq-api.json.sample + ${INSTALL_DATA} ${WRKDIR}/${PORTNAME}-${GH_TAGNAME}/etc/cbsd_api_cloud_images.json ${STAGEDIR}${PREFIX}/etc/cbsd_api_cloud_images.json.sample .include diff --git a/sysutils/cbsd-mq-api/distinfo b/sysutils/cbsd-mq-api/distinfo index 37c797f38f36..d14528761155 100644 --- a/sysutils/cbsd-mq-api/distinfo +++ b/sysutils/cbsd-mq-api/distinfo @@ -1,9 +1,9 @@ -TIMESTAMP = 1638458854 -SHA256 (cbsd-cbsd-mq-api-0.3_GH0.tar.gz) = eb562d965a2b5ab555e8352cd3302b7cc097d85afd31018c469b0e1aff99f11c -SIZE (cbsd-cbsd-mq-api-0.3_GH0.tar.gz) = 12084 -SHA256 (beanstalkd-go-beanstalk-3bed00be7a17_GH0.tar.gz) = 4efb9667cadd4945ec54ccc3caa824ab7fb06f75f8b234c1899c4664dc718bb7 -SIZE (beanstalkd-go-beanstalk-3bed00be7a17_GH0.tar.gz) = 8063 -SHA256 (gorilla-mux-d07530f46e1e_GH0.tar.gz) = 398bd970e01d161642951f30fe285fce29564444c7f7776f8dddb271411882d0 -SIZE (gorilla-mux-d07530f46e1e_GH0.tar.gz) = 45450 -SHA256 (golang-crypto-5ff15b29337e_GH0.tar.gz) = 094d3a6563b4e2d7ce5e4ac2ff5f79bc14a4a7111a3310270e63505705a43cb6 -SIZE (golang-crypto-5ff15b29337e_GH0.tar.gz) = 1732042 +TIMESTAMP = 1733860725 +SHA256 (cbsd-cbsd-mq-api-0.4_GH0.tar.gz) = 07348d331d4a68faecb260f99b9328c34f94504169533f08235cc348491abd0b +SIZE (cbsd-cbsd-mq-api-0.4_GH0.tar.gz) = 17585 +SHA256 (beanstalkd-go-beanstalk-52e4a01_GH0.tar.gz) = 5715c2bdcd005125d023d4b415049c0b5ba4635c40664ebdbd75f1badfcf8a66 +SIZE (beanstalkd-go-beanstalk-52e4a01_GH0.tar.gz) = 8105 +SHA256 (gorilla-mux-v1.8.1_GH0.tar.gz) = c2a09e78d1886abb2d291b472eba3ac9185acb35234c1f5616669664ba893d6d +SIZE (gorilla-mux-v1.8.1_GH0.tar.gz) = 47033 +SHA256 (golang-crypto-v0.30.0_GH0.tar.gz) = 97d00ce44d288c380e45239dd691df57f39125c0a00ee198bfb6444b681d530a +SIZE (golang-crypto-v0.30.0_GH0.tar.gz) = 1837435 diff --git a/sysutils/cbsd-mq-api/files/cbsd-mq-api.in b/sysutils/cbsd-mq-api/files/cbsd-mq-api.in index bc9027146748..c1e428285458 100644 --- a/sysutils/cbsd-mq-api/files/cbsd-mq-api.in +++ b/sysutils/cbsd-mq-api/files/cbsd-mq-api.in @@ -1,80 +1,80 @@ #!/bin/sh # PROVIDE: cbsd_mq_api -# REQUIRE: NETWORK -# BEFORE: DAEMON +# REQUIRE: LOGIN FILESYSTEMS cbsdd +# KEYWORD: shutdown . /etc/rc.subr name="cbsd_mq_api" desc="CBSD API Module" rcvar="cbsd_mq_api_enable" pidfile="/var/run/${name}.pid" daemon_pidfile="/var/run/${name}-daemon.pid" logdir="/var/log/${name}" logfile="${logdir}/cbsd_mq_api.log" extra_commands="reload" command="%%PREFIX%%/bin/cbsd-mq-api" cbsd_mq_api_user=${cbsd_mq_api_user-"cbsd"} cbsd_mq_api_config=${cbsd_mq_api_config-"%%PREFIX%%/etc/cbsd-mq-api.json"} required_files="${cbsd_mq_api_config}" cbsd_mq_api_args=${cbsd_mq_api_args-"-config ${cbsd_mq_api_config}"} # ACL flags sample: #cbsd_mq_api_flags="-listen 127.0.0.1:65531 -allowlist %%PREFIX%%/etc/cbsd-mq-api.allow" cbsd_mq_api_flags=${cbsd_mq_api_flags="-listen 127.0.0.1:65531"} load_rc_config ${name} start_cmd="start" stop_cmd="stop" status_cmd="status" reload_cmd="reload" stop() { if [ -f "${daemon_pidfile}" ]; then pids=$( pgrep -F ${daemon_pidfile} 2>&1 ) _err=$? [ ${_err} -eq 0 ] && kill -9 ${pids} && /bin/rm -f ${daemon_pidfile} fi if [ -f "${pidfile}" ]; then pids=$( pgrep -F ${pidfile} 2>&1 ) _err=$? [ ${_err} -eq 0 ] && kill -9 ${pids} && /bin/rm -f ${pidfile} fi } start() { [ ! -d ${logdir} ] && mkdir -p ${logdir} touch ${logfile} chown ${cbsd_mq_api_user} ${logdir} ${logfile} /usr/sbin/daemon -u ${cbsd_mq_api_user} -f -R5 -p ${pidfile} -P ${daemon_pidfile} -o ${logfile} ${command} ${cbsd_mq_api_args} ${cbsd_mq_api_flags} } reload() { stop start } status() { if [ -f "${pidfile}" ]; then pids=$( pgrep -F ${pidfile} 2>&1 ) _err=$? if [ ${_err} -eq 0 ]; then echo "${name} is running as pid ${pids}" exit 0 else echo "wrong pid: ${pids}" exit 1 fi else echo "no pidfile $pidfile" exit 1 fi } run_rc_command "$1"