mirror of
https://github.com/falcosecurity/falco.git
synced 2025-08-15 21:03:54 +00:00
fix: stop also falco-kmod-inject.service
unit
Signed-off-by: Andrea Terzolo <andrea.terzolo@polito.it>
This commit is contained in:
parent
ee08c4d3de
commit
5bb566d613
@ -22,16 +22,18 @@ set -e
|
|||||||
# Currently running falco service uses the driver, so stop it before driver cleanup
|
# Currently running falco service uses the driver, so stop it before driver cleanup
|
||||||
|
|
||||||
if [ -d /run/systemd/system ] && [ "$1" = remove ]; then
|
if [ -d /run/systemd/system ] && [ "$1" = remove ]; then
|
||||||
echo "[POST-REMOVE] Stop all Falco services:"
|
echo "[PRE-REMOVE] Stop all Falco services:"
|
||||||
systemctl --system stop 'falco-kmod.service' || true
|
systemctl --system stop 'falco-kmod.service' || true
|
||||||
systemctl --system stop 'falco-bpf.service' || true
|
systemctl --system stop 'falco-bpf.service' || true
|
||||||
systemctl --system stop 'falco-modern-bpf.service' || true
|
systemctl --system stop 'falco-modern-bpf.service' || true
|
||||||
systemctl --system stop 'falco-plugin.service' || true
|
systemctl --system stop 'falco-plugin.service' || true
|
||||||
|
# this should be stopped after 'falco-kmod.service'
|
||||||
|
systemctl --system stop 'falco-kmod-inject.service' || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case "$1" in
|
case "$1" in
|
||||||
remove|upgrade|deconfigure)
|
remove|upgrade|deconfigure)
|
||||||
echo "[POST-REMOVE] Call 'falco-driver-loader --clean:'"
|
echo "[PRE-REMOVE] Call 'falco-driver-loader --clean:'"
|
||||||
falco-driver-loader --clean
|
falco-driver-loader --clean
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
@ -19,14 +19,16 @@ set -e
|
|||||||
# pre uninstall mirrored from .deb
|
# pre uninstall mirrored from .deb
|
||||||
# Currently running falco service uses the driver, so stop it before driver cleanup
|
# Currently running falco service uses the driver, so stop it before driver cleanup
|
||||||
if [ -d /run/systemd/system ] && [ $1 -eq 0 ]; then
|
if [ -d /run/systemd/system ] && [ $1 -eq 0 ]; then
|
||||||
echo "[POST-REMOVE] Stop all Falco services:"
|
echo "[PRE-REMOVE] Stop all Falco services:"
|
||||||
systemctl --system stop 'falco-kmod.service' || true
|
systemctl --system stop 'falco-kmod.service' || true
|
||||||
systemctl --system stop 'falco-bpf.service' || true
|
systemctl --system stop 'falco-bpf.service' || true
|
||||||
systemctl --system stop 'falco-modern-bpf.service' || true
|
systemctl --system stop 'falco-modern-bpf.service' || true
|
||||||
systemctl --system stop 'falco-plugin.service' || true
|
systemctl --system stop 'falco-plugin.service' || true
|
||||||
|
# this should be stopped after 'falco-kmod.service'
|
||||||
|
systemctl --system stop 'falco-kmod-inject.service' || true
|
||||||
fi
|
fi
|
||||||
|
|
||||||
echo "[POST-REMOVE] Call 'falco-driver-loader --clean:'"
|
echo "[PRE-REMOVE] Call 'falco-driver-loader --clean:'"
|
||||||
falco-driver-loader --clean
|
falco-driver-loader --clean
|
||||||
|
|
||||||
# validate rpm macros by `rpm -qp --scripts <rpm>`
|
# validate rpm macros by `rpm -qp --scripts <rpm>`
|
||||||
|
@ -4,7 +4,5 @@ Documentation=https://falco.org/docs/
|
|||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=oneshot
|
Type=oneshot
|
||||||
RemainAfterExit=yes
|
|
||||||
User=root
|
User=root
|
||||||
ExecStart=/sbin/modprobe falco
|
ExecStart=/sbin/modprobe falco
|
||||||
ExecStop=/sbin/rmmod falco
|
|
||||||
|
@ -11,6 +11,7 @@ Conflicts=falco-plugin.service
|
|||||||
Type=simple
|
Type=simple
|
||||||
User=root
|
User=root
|
||||||
ExecStart=/usr/bin/falco --pidfile=/var/run/falco.pid
|
ExecStart=/usr/bin/falco --pidfile=/var/run/falco.pid
|
||||||
|
ExecStopPost=/sbin/rmmod falco
|
||||||
UMask=0077
|
UMask=0077
|
||||||
TimeoutSec=30
|
TimeoutSec=30
|
||||||
RestartSec=15s
|
RestartSec=15s
|
||||||
|
Loading…
Reference in New Issue
Block a user