mirror of
https://github.com/falcosecurity/falco.git
synced 2025-09-01 06:37:22 +00:00
new(scrips): improve systemd units for rpm and debian.
Unify them; plus, rework systemd units to support eBPF too. Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
This commit is contained in:
committed by
poiana
parent
f43e6c445a
commit
06fe9e6985
@@ -38,19 +38,19 @@ fi
|
||||
# systemd_post macro expands to
|
||||
# if postinst:
|
||||
# `systemd-update-helper install-system-units <service>`
|
||||
%systemd_post 'falco.service'
|
||||
%systemd_post 'falco@kmod.target'
|
||||
|
||||
# post install mirrored from .deb
|
||||
if [ $1 -eq 1 ]; then
|
||||
# This will only remove masks created on package removal.
|
||||
/usr/bin/systemctl --system unmask 'falco.service' >/dev/null || true
|
||||
/usr/bin/systemctl --system unmask 'falco@kmod.target' >/dev/null || true
|
||||
|
||||
# enable falco on installation
|
||||
# note: DEB postinstall script checks for changed symlinks
|
||||
/usr/bin/systemctl --system enable 'falco.service' >/dev/null || true
|
||||
/usr/bin/systemctl --system enable 'falco@kmod.target' >/dev/null || true
|
||||
|
||||
# start falco on installation
|
||||
/usr/bin/systemctl --system start 'falco.service' >/dev/null || true
|
||||
/usr/bin/systemctl --system start 'falco@kmod.target' >/dev/null || true
|
||||
fi
|
||||
|
||||
# post upgrade mirrored from .deb
|
||||
@@ -59,6 +59,6 @@ if [ $1 -gt 1 ]; then
|
||||
/usr/bin/systemctl --system daemon-reload >/dev/null || true
|
||||
|
||||
# restart falco on upgrade if service is already running
|
||||
/usr/bin/systemctl --system condrestart 'falco.service' >/dev/null || true
|
||||
/usr/bin/systemctl --system condrestart 'falco@kmod.target' >/dev/null || true
|
||||
fi
|
||||
fi
|
||||
|
Reference in New Issue
Block a user