From 798b39ec092d85ddb4e276550bf9da786c55771c Mon Sep 17 00:00:00 2001 From: Josh Brower Date: Wed, 14 Sep 2022 18:36:26 -0400 Subject: [PATCH] elastic-fleet so-status & restart scripts --- salt/common/tools/sbin/so-elastic-fleet-restart | 12 ++++++++++++ salt/common/tools/sbin/so-elastic-fleet-start | 12 ++++++++++++ salt/common/tools/sbin/so-elastic-fleet-stop | 12 ++++++++++++ salt/elastic-fleet/init.sls | 5 +++++ 4 files changed, 41 insertions(+) create mode 100755 salt/common/tools/sbin/so-elastic-fleet-restart create mode 100755 salt/common/tools/sbin/so-elastic-fleet-start create mode 100755 salt/common/tools/sbin/so-elastic-fleet-stop diff --git a/salt/common/tools/sbin/so-elastic-fleet-restart b/salt/common/tools/sbin/so-elastic-fleet-restart new file mode 100755 index 000000000..e3c38b409 --- /dev/null +++ b/salt/common/tools/sbin/so-elastic-fleet-restart @@ -0,0 +1,12 @@ +#!/bin/bash + +# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one +# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at +# https://securityonion.net/license; you may not use this file except in compliance with the +# Elastic License 2.0. + + + +. /usr/sbin/so-common + +/usr/sbin/so-restart elastic-fleet $1 diff --git a/salt/common/tools/sbin/so-elastic-fleet-start b/salt/common/tools/sbin/so-elastic-fleet-start new file mode 100755 index 000000000..5ae7d21a1 --- /dev/null +++ b/salt/common/tools/sbin/so-elastic-fleet-start @@ -0,0 +1,12 @@ +#!/bin/bash + +# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one +# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at +# https://securityonion.net/license; you may not use this file except in compliance with the +# Elastic License 2.0. + + + +. /usr/sbin/so-common + +/usr/sbin/so-start elastic-fleet $1 diff --git a/salt/common/tools/sbin/so-elastic-fleet-stop b/salt/common/tools/sbin/so-elastic-fleet-stop new file mode 100755 index 000000000..f3fc3b923 --- /dev/null +++ b/salt/common/tools/sbin/so-elastic-fleet-stop @@ -0,0 +1,12 @@ +#!/bin/bash + +# Copyright Security Onion Solutions LLC and/or licensed to Security Onion Solutions LLC under one +# or more contributor license agreements. Licensed under the Elastic License 2.0 as shown at +# https://securityonion.net/license; you may not use this file except in compliance with the +# Elastic License 2.0. + + + +. /usr/sbin/so-common + +/usr/sbin/so-stop elastic-fleet $1 diff --git a/salt/elastic-fleet/init.sls b/salt/elastic-fleet/init.sls index 9ba74d095..4b985c23f 100644 --- a/salt/elastic-fleet/init.sls +++ b/salt/elastic-fleet/init.sls @@ -66,6 +66,11 @@ so-elastic-fleet: - FLEET_CA=/etc/pki/intca.crt {% endif %} +append_so-elastic-fleet_so-status.conf: + file.append: + - name: /opt/so/conf/so-status/so-status.conf + - text: so-elastic-fleet + {% else %} {{sls}}_state_not_allowed: