Compare commits

...

3 commits

Author SHA1 Message Date
ppom aa944cf05c fix git "dubious ownership" issue
fix #90
2024-04-26 12:00:00 +02:00
ppom 3d697a5003 systemd service files cleaning 🧹 2024-04-20 12:00:00 +02:00
ppom 38000b102f remove dead code 2024-04-11 12:00:00 +02:00
6 changed files with 8 additions and 25 deletions

View file

@ -47,5 +47,5 @@ install: all
install -m755 nft46 $(DESTDIR)$(BINDIR)
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

View file

@ -77,14 +77,6 @@ func (csf ClientStatusFlush) MarshalJSON() ([]byte, error) {
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) {
response := SendAndRetrieve(Request{Show, ""})
if response.Err != nil {

View file

@ -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

View file

@ -1,4 +1,8 @@
# vim: ft=systemd
[Unit]
Description=A daemon that scans program outputs for repeated patterns, and takes action.
Documentation=https://reaction.ppom.me
[Install]
WantedBy=multi-user.target
# 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
[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)
StateDirectory=reaction

View file

@ -1,3 +1,4 @@
# vim: ft=systemd
[Unit]
Description=A daemon that scans program outputs for repeated patterns, and takes action.
Documentation=https://framagit.org/ppom/reaction-wiki

View file

@ -6,7 +6,7 @@ git push --tags
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}"