mirror of
https://github.com/falcosecurity/falco.git
synced 2025-09-01 22:58:12 +00:00
update(scripts): multiple renamings to falcoctl service + fixed description.
Moreover, now falcoctl service is enabled by default. It being bound to falco.target allows us to avoid it running when falco.target is not running. Signed-off-by: Federico Di Pierro <nierro92@gmail.com>
This commit is contained in:
committed by
poiana
parent
2591ed4d68
commit
0f22fde7cd
@@ -16,7 +16,7 @@
|
||||
#
|
||||
|
||||
chosen_driver=
|
||||
enable_falcoctl=0
|
||||
enable_falcoctl=1
|
||||
|
||||
if [ $1 -eq 1 ]; then
|
||||
if [ -x /usr/bin/dialog ]; then
|
||||
@@ -39,20 +39,18 @@ if [ $1 -eq 1 ]; then
|
||||
chosen_driver="modern-bpf"
|
||||
;;
|
||||
5)
|
||||
chosen_driver="plugin"
|
||||
chosen_driver="plugin (needs manual configuration)"
|
||||
;;
|
||||
esac
|
||||
if [ -n "$chosen_driver" ]; then
|
||||
CHOICE=$(dialog --clear --title "Falcoctl" --menu "Do you want to subscribe to automatic ruleset feed?" 10 40 2 \
|
||||
1 "No" \
|
||||
2 "Yes" \
|
||||
2>&1 >/dev/tty)
|
||||
case $CHOICE in
|
||||
2)
|
||||
enable_falcoctl=1
|
||||
;;
|
||||
esac
|
||||
fi
|
||||
CHOICE=$(dialog --clear --title "Falcoctl" --menu "Do you want to follow automatic ruleset updates?" 10 40 2 \
|
||||
1 "Yes" \
|
||||
2 "No" \
|
||||
2>&1 >/dev/tty)
|
||||
case $CHOICE in
|
||||
2)
|
||||
enable_falcoctl=0
|
||||
;;
|
||||
esac
|
||||
clear
|
||||
fi
|
||||
fi
|
||||
@@ -87,13 +85,12 @@ if [ $1 -eq 1 ]; then
|
||||
systemctl --system enable "falco-$chosen_driver.service" || true
|
||||
echo "[POST-INSTALL] Start 'falco-$chosen_driver.service':"
|
||||
systemctl --system start "falco-$chosen_driver.service" || true
|
||||
|
||||
if [ $enable_falcoctl -eq 1 ]; then
|
||||
echo "[POST-INSTALL] Enable 'falcoctl.service':"
|
||||
systemctl --system enable "falcoctl.service" || true
|
||||
echo "[POST-INSTALL] Start 'falcoctl.service':"
|
||||
systemctl --system start "falcoctl.service" || true
|
||||
fi
|
||||
fi
|
||||
if [ $enable_falcoctl -eq 1 ]; then
|
||||
echo "[POST-INSTALL] Enable 'falcoctl-artifact-follow.service':"
|
||||
systemctl --system enable "falcoctl-artifact-follow.service" || true
|
||||
echo "[POST-INSTALL] Start 'falcoctl-artifact-follow.service':"
|
||||
systemctl --system start "falcoctl-artifact-follow.service" || true
|
||||
fi
|
||||
fi
|
||||
|
||||
@@ -106,11 +103,11 @@ if [ $1 -gt 1 ]; then
|
||||
echo "[POST-INSTALL] Trigger 'falco-$chosen_driver.service' condrestart:"
|
||||
# restart falco on upgrade if service is already running
|
||||
systemctl --system condrestart "falco-$chosen_driver.service" || true
|
||||
if [ $enable_falcoctl -eq 1 ]; then
|
||||
echo "[POST-INSTALL] Trigger 'falcoctl.service' condrestart:"
|
||||
# restart falcoctl on upgrade if service is already running
|
||||
systemctl --system condrestart "falcoctl.service" || true
|
||||
fi
|
||||
fi
|
||||
if [ $enable_falcoctl -eq 1 ]; then
|
||||
echo "[POST-INSTALL] Trigger 'falcoctl-artifact-follow.service' condrestart:"
|
||||
# restart falcoctl-artifact-follow on upgrade if service is already running
|
||||
systemctl --system condrestart "falcoctl-artifact-follow.service" || true
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
Reference in New Issue
Block a user