mirror of
https://git.freebsd.org/ports.git
synced 2026-06-02 11:08:52 +00:00
irc/irccat: new port: IRC client daemon with scripting & webhook support
Sponsored by: SkunkWerks, GmbH
This commit is contained in:
@@ -29,6 +29,7 @@
|
||||
SUBDIR += irc
|
||||
SUBDIR += irc2dc
|
||||
SUBDIR += ircII
|
||||
SUBDIR += irccat
|
||||
SUBDIR += ircd-hybrid
|
||||
SUBDIR += ircd-ratbox
|
||||
SUBDIR += ircproxy
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
PORTNAME= irccat
|
||||
DISTVERSIONPREFIX= v
|
||||
DISTVERSION= 0.4.13
|
||||
CATEGORIES= irc
|
||||
|
||||
MAINTAINER= dch@FreeBSD.org
|
||||
COMMENT= Send events to IRC channels from scripts and other applications
|
||||
WWW= https://github.com/irccloud/irccat
|
||||
|
||||
LICENSE= GPLv3
|
||||
LICENSE_FILE= ${WRKSRC}/LICENSE
|
||||
|
||||
USES= go:modules
|
||||
USE_RC_SUBR= irccat
|
||||
|
||||
GO_MODULE= github.com/irccloud/irccat
|
||||
|
||||
SUB_FILES= pkg-message
|
||||
|
||||
PLIST_FILES= "@sample ${ETCDIR}/irccat.yaml.sample" \
|
||||
bin/${PORTNAME}
|
||||
|
||||
post-install:
|
||||
@${MKDIR} ${STAGEDIR}${ETCDIR}
|
||||
${INSTALL_DATA} ${WRKSRC}/examples/irccat.json \
|
||||
${STAGEDIR}${ETCDIR}/irccat.yaml.sample
|
||||
|
||||
.include <bsd.port.mk>
|
||||
@@ -0,0 +1,5 @@
|
||||
TIMESTAMP = 1779022850
|
||||
SHA256 (go/irc_irccat/irccat-v0.4.13/v0.4.13.mod) = cdf4a61e165e6bac97b61eae2eeb106ecca73f6c0ce144c1db8f674a467eea10
|
||||
SIZE (go/irc_irccat/irccat-v0.4.13/v0.4.13.mod) = 1148
|
||||
SHA256 (go/irc_irccat/irccat-v0.4.13/v0.4.13.zip) = e52d4eff830eb173eef4b615665659766f49bc4b84e58cbf7c5aaa33c03b1726
|
||||
SIZE (go/irc_irccat/irccat-v0.4.13/v0.4.13.zip) = 55888
|
||||
@@ -0,0 +1,53 @@
|
||||
#!/bin/sh
|
||||
|
||||
# PROVIDE: irccat
|
||||
# REQUIRE: LOGIN
|
||||
# KEYWORD: shutdown
|
||||
#
|
||||
# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
|
||||
# to enable this service:
|
||||
#
|
||||
# irccat_enable (bool): Set to NO by default.
|
||||
# Set it to YES to enable irccat.
|
||||
# irccat_user (str): Set user to run irccat as.
|
||||
# Default is "uucp".
|
||||
# irccat_group (str): Set group to run irccat as.
|
||||
# Default is "uucp".
|
||||
# irccat_config (str): Path to the irccat configuration file.
|
||||
# Default is "%%ETCDIR%%/irccat.yaml".
|
||||
# irccat_flags (str): Extra flags passed to irccat.
|
||||
|
||||
. /etc/rc.subr
|
||||
|
||||
name=irccat
|
||||
rcvar=irccat_enable
|
||||
|
||||
load_rc_config $name
|
||||
|
||||
: ${irccat_enable:="NO"}
|
||||
: ${irccat_user:="uucp"}
|
||||
: ${irccat_group:="uucp"}
|
||||
: ${irccat_config:="%%ETCDIR%%/irccat.yaml"}
|
||||
|
||||
piddir="/var/run/${name}"
|
||||
pidfile="${piddir}/${name}.pid"
|
||||
daemon_pidfile="${piddir}/${name}_daemon.pid"
|
||||
required_files="${irccat_config}"
|
||||
procname="%%PREFIX%%/bin/${name}"
|
||||
command="/usr/sbin/daemon"
|
||||
command_args="-f -P ${daemon_pidfile} -p ${pidfile} -t ${name} ${procname} -config ${irccat_config} ${irccat_flags}"
|
||||
|
||||
start_precmd="${name}_prestart"
|
||||
|
||||
irccat_prestart()
|
||||
{
|
||||
if [ ! -d "${piddir}" ]; then
|
||||
install -d -o "${irccat_user}" -g "${irccat_group}" -m 0755 \
|
||||
"${piddir}" || return 1
|
||||
else
|
||||
chown "${irccat_user}:${irccat_group}" "${piddir}" || return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
run_rc_command "$1"
|
||||
@@ -0,0 +1,25 @@
|
||||
[
|
||||
{ type: install
|
||||
message: <<EOM
|
||||
To configure irccat:
|
||||
|
||||
Modify the default config file in %%ETCDIR%%/irccat.yaml as required, setting
|
||||
at least IRC server, nick, and any required channels.
|
||||
|
||||
See https://github.com/irccloud/irccat for full documentation.
|
||||
|
||||
To run irccat as a daemon, enable it in /etc/rc.conf:
|
||||
|
||||
service irccat enable
|
||||
service irccat start
|
||||
|
||||
By default irccat runs as user/group "uucp". Override with
|
||||
irccat_user / irccat_group in /etc/rc.conf if you want a
|
||||
different account.
|
||||
|
||||
Test that messages reach IRC:
|
||||
|
||||
echo "#yourchannel Hello from irccat" | nc localhost 12345
|
||||
EOM
|
||||
}
|
||||
]
|
||||
@@ -0,0 +1,9 @@
|
||||
irccat lets you easily send events to IRC channels from scripts and other
|
||||
applications.
|
||||
|
||||
Features:
|
||||
|
||||
- TCP listener: cat strings to a TCP port and have them sent to IRC
|
||||
- HTTP listener: send messages and trigger commands via HTTP
|
||||
- Webhooks: receive events from GitHub, GitLab, Sentry, Grafana, and more
|
||||
- Commands: trigger external scripts via IRC messages
|
||||
Reference in New Issue
Block a user