mirror of
https://framagit.org/ppom/reaction
synced 2024-06-02 16:42:11 +02:00
Compare commits
3 commits
196e157e46
...
aa944cf05c
Author | SHA1 | Date | |
---|---|---|---|
aa944cf05c | |||
3d697a5003 | |||
38000b102f |
2
Makefile
2
Makefile
|
@ -47,5 +47,5 @@ install: all
|
||||||
install -m755 nft46 $(DESTDIR)$(BINDIR)
|
install -m755 nft46 $(DESTDIR)$(BINDIR)
|
||||||
|
|
||||||
install_systemd: install
|
install_systemd: install
|
||||||
install -m644 config/reaction.debian.service $(SYSTEMDDIR)/system/reaction.service
|
install -m644 config/reaction.example.service $(SYSTEMDDIR)/system/reaction.service
|
||||||
sed -i 's#/usr/bin#$(DESTDIR)$(BINDIR)#' $(SYSTEMDDIR)/system/reaction.service
|
sed -i 's#/usr/bin#$(DESTDIR)$(BINDIR)#' $(SYSTEMDDIR)/system/reaction.service
|
||||||
|
|
|
@ -77,14 +77,6 @@ func (csf ClientStatusFlush) MarshalJSON() ([]byte, error) {
|
||||||
return json.Marshal(ret)
|
return json.Marshal(ret)
|
||||||
}
|
}
|
||||||
|
|
||||||
// end block
|
|
||||||
|
|
||||||
func usage(err string) {
|
|
||||||
fmt.Println("Usage: reactionc")
|
|
||||||
fmt.Println("Usage: reactionc flush <PATTERN>")
|
|
||||||
logger.Fatalln(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
func ClientShow(format, stream, filter string, regex *regexp.Regexp) {
|
func ClientShow(format, stream, filter string, regex *regexp.Regexp) {
|
||||||
response := SendAndRetrieve(Request{Show, ""})
|
response := SendAndRetrieve(Request{Show, ""})
|
||||||
if response.Err != nil {
|
if response.Err != nil {
|
||||||
|
|
|
@ -1,14 +0,0 @@
|
||||||
[Unit]
|
|
||||||
Description=A daemon that scans program outputs for repeated patterns, and takes action.
|
|
||||||
Documentation=https://framagit.org/ppom/reaction-wiki
|
|
||||||
# Ensure reaction will insert its chain after docker has inserted theirs. Only useful when iptables & docker are used
|
|
||||||
# After=docker.service
|
|
||||||
|
|
||||||
[Service]
|
|
||||||
ExecStart=/usr/bin/reaction start -c /etc/reaction.jsonnet
|
|
||||||
StateDirectory=reaction
|
|
||||||
RuntimeDirectory=reaction
|
|
||||||
WorkingDirectory=/var/lib/reaction
|
|
||||||
|
|
||||||
[Install]
|
|
||||||
WantedBy=multi-user.target
|
|
|
@ -1,4 +1,8 @@
|
||||||
# vim: ft=systemd
|
# vim: ft=systemd
|
||||||
|
[Unit]
|
||||||
|
Description=A daemon that scans program outputs for repeated patterns, and takes action.
|
||||||
|
Documentation=https://reaction.ppom.me
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
# Ensure reaction will insert its chain after docker has inserted theirs. Only useful when iptables & docker are used
|
# Ensure reaction will insert its chain after docker has inserted theirs. Only useful when iptables & docker are used
|
||||||
|
@ -6,7 +10,7 @@ WantedBy=multi-user.target
|
||||||
|
|
||||||
# See `man systemd.exec` and `man systemd.service` for most options below
|
# See `man systemd.exec` and `man systemd.service` for most options below
|
||||||
[Service]
|
[Service]
|
||||||
ExecStart=/path/to/reaction start -c /etc/reaction.jsonnet
|
ExecStart=/usr/bin/reaction start -c /etc/reaction.jsonnet
|
||||||
|
|
||||||
# Ask systemd to create /var/lib/reaction (/var/lib/ is implicit)
|
# Ask systemd to create /var/lib/reaction (/var/lib/ is implicit)
|
||||||
StateDirectory=reaction
|
StateDirectory=reaction
|
||||||
|
|
1
debian/reaction@.service
vendored
1
debian/reaction@.service
vendored
|
@ -1,3 +1,4 @@
|
||||||
|
# vim: ft=systemd
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=A daemon that scans program outputs for repeated patterns, and takes action.
|
Description=A daemon that scans program outputs for repeated patterns, and takes action.
|
||||||
Documentation=https://framagit.org/ppom/reaction-wiki
|
Documentation=https://framagit.org/ppom/reaction-wiki
|
||||||
|
|
|
@ -6,7 +6,7 @@ git push --tags
|
||||||
|
|
||||||
TAG="$(git tag --sort=v:refname | tail -n1)"
|
TAG="$(git tag --sort=v:refname | tail -n1)"
|
||||||
|
|
||||||
docker run -it --rm -e HOME=/tmp/ -v "$(pwd)":/tmp/code -w /tmp/code golang:1.20-bullseye sh -c "make reaction_${TAG:1}-1_amd64.deb reaction ip46tables nft46"
|
docker run -it --rm -e HOME=/tmp/ -v "$(pwd)":/tmp/code -w /tmp/code golang:1.20-bullseye sh -c "git config --global --add safe.directory . && make reaction_${TAG:1}-1_amd64.deb reaction ip46tables nft46"
|
||||||
|
|
||||||
make "signatures_${TAG:1}"
|
make "signatures_${TAG:1}"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue