Skip to content

Commit

Permalink
Osquery - Use 'systemctl' instead of 'service'
Browse files Browse the repository at this point in the history
  • Loading branch information
csavelief committed Nov 11, 2024
1 parent 756599a commit dcaef64
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions app/Models/YnhOsquery.php
Original file line number Diff line number Diff line change
Expand Up @@ -309,12 +309,9 @@ public static function monitorServer(YnhServer $server): string
fi
# Stop Osquery then LogAlert because reloading resets LogAlert internal state (see https://github.com/jhuckaby/logalert for details)
osqueryctl stop osqueryd
systemctl stop osqueryd
systemctl stop logalert
# An attempt at dealing with https://github.com/osquery/osquery/issues/8064
sleep 20
# Cleanup
if [ -f /opt/logparser/12408bd3.jsonl.gz ]; then
rm /opt/logparser/12408bd3.jsonl.gz
Expand Down Expand Up @@ -418,7 +415,7 @@ public static function monitorServer(YnhServer $server): string
# Start LogAlert then Osquery because reloading resets LogAlert internal state (see https://github.com/jhuckaby/logalert for details)
systemctl start logalert
osqueryctl start osqueryd
systemctl start osqueryd
# If fail2ban is up-and-running, whitelist AdversaryMeter IP addresses
if systemctl is-active --quiet fail2ban; then
Expand Down

0 comments on commit dcaef64

Please sign in to comment.