mirror of
https://github.com/falcosecurity/falco.git
synced 2025-09-07 01:30:13 +00:00
fix(scripts): fixed some debian issues by directly using systemctl tool.
Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
This commit is contained in:
committed by
poiana
parent
cb20cf83ff
commit
01f4af480d
@@ -70,10 +70,11 @@ esac
|
||||
# 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@kmod.target" >/dev/null || true
|
||||
/usr/bin/systemctl --system unmask "falco@bpf.target" >/dev/null || true
|
||||
/usr/bin/systemctl --system unmask "falco@modern_bpf.target" >/dev/null || true
|
||||
/usr/bin/systemctl --system unmask "falco@plugin.target" >/dev/null || true
|
||||
/usr/bin/systemctl --system unmask "falco@.target" >/dev/null || true
|
||||
/usr/bin/systemctl --system unmask "falco-kmod.service" >/dev/null || true
|
||||
/usr/bin/systemctl --system unmask "falco-bpf.service" >/dev/null || true
|
||||
/usr/bin/systemctl --system unmask "falco-modern_bpf.service" >/dev/null || true
|
||||
/usr/bin/systemctl --system unmask "falco-plugin.service" >/dev/null || true
|
||||
|
||||
if [ -n "$chosen_driver" ]; then
|
||||
# enable falco on installation
|
||||
@@ -89,7 +90,6 @@ fi
|
||||
if [ $1 -gt 1 ]; then
|
||||
if [ -d /run/systemd/system ]; then
|
||||
/usr/bin/systemctl --system daemon-reload >/dev/null || true
|
||||
|
||||
if [ -n "$chosen_driver" ]; then
|
||||
# restart falco on upgrade if service is already running
|
||||
/usr/bin/systemctl --system condrestart "falco@$chosen_driver.target" >/dev/null || true
|
||||
|
@@ -20,10 +20,11 @@ set -e
|
||||
# post uninstall mirrored from .deb
|
||||
if [ -d /run/systemd/system ] && [ "$1" = 0 ]; then
|
||||
/usr/bin/systemctl --system daemon-reload >/dev/null || true
|
||||
/usr/bin/systemctl --system mask 'falco@kmod.target' >/dev/null || true
|
||||
/usr/bin/systemctl --system mask 'falco@bpf.target' >/dev/null || true
|
||||
/usr/bin/systemctl --system mask 'falco@modern_bpf.target' >/dev/null || true
|
||||
/usr/bin/systemctl --system mask 'falco@plugin.target' >/dev/null || true
|
||||
/usr/bin/systemctl --system mask 'falco@.target' >/dev/null || true
|
||||
/usr/bin/systemctl --system mask 'falco-kmod.service' >/dev/null || true
|
||||
/usr/bin/systemctl --system mask 'falco-bpf.service' >/dev/null || true
|
||||
/usr/bin/systemctl --system mask 'falco-modern_bpf.service' >/dev/null || true
|
||||
/usr/bin/systemctl --system mask 'falco-plugin.service' >/dev/null || true
|
||||
fi
|
||||
|
||||
# validate rpm macros by `rpm -qp --scripts <rpm>`
|
||||
|
Reference in New Issue
Block a user