From 798b39ec092d85ddb4e276550bf9da786c55771c Mon Sep 17 00:00:00 2001 From: Josh Brower Date: Wed, 14 Sep 2022 18:36:26 -0400 Subject: [PATCH 1/2] 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: From bdfde669f38cc54c6648dc35c4df8f0d115f3eb2 Mon Sep 17 00:00:00 2001 From: Josh Brower Date: Wed, 14 Sep 2022 18:38:08 -0400 Subject: [PATCH 2/2] remove outdated scripts --- salt/common/tools/sbin/so-cortex-restart | 12 ------------ salt/common/tools/sbin/so-cortex-start | 12 ------------ salt/common/tools/sbin/so-cortex-stop | 12 ------------ salt/common/tools/sbin/so-cortex-user-add | 12 ------------ salt/common/tools/sbin/so-cortex-user-enable | 12 ------------ salt/common/tools/sbin/so-thehive-es-restart | 12 ------------ salt/common/tools/sbin/so-thehive-es-start | 12 ------------ salt/common/tools/sbin/so-thehive-es-stop | 12 ------------ salt/common/tools/sbin/so-thehive-restart | 12 ------------ salt/common/tools/sbin/so-thehive-start | 12 ------------ salt/common/tools/sbin/so-thehive-stop | 12 ------------ salt/common/tools/sbin/so-thehive-user-add | 12 ------------ salt/common/tools/sbin/so-thehive-user-enable | 12 ------------ salt/common/tools/sbin/so-thehive-user-update | 12 ------------ 14 files changed, 168 deletions(-) delete mode 100755 salt/common/tools/sbin/so-cortex-restart delete mode 100755 salt/common/tools/sbin/so-cortex-start delete mode 100755 salt/common/tools/sbin/so-cortex-stop delete mode 100755 salt/common/tools/sbin/so-cortex-user-add delete mode 100755 salt/common/tools/sbin/so-cortex-user-enable delete mode 100755 salt/common/tools/sbin/so-thehive-es-restart delete mode 100755 salt/common/tools/sbin/so-thehive-es-start delete mode 100755 salt/common/tools/sbin/so-thehive-es-stop delete mode 100755 salt/common/tools/sbin/so-thehive-restart delete mode 100755 salt/common/tools/sbin/so-thehive-start delete mode 100755 salt/common/tools/sbin/so-thehive-stop delete mode 100755 salt/common/tools/sbin/so-thehive-user-add delete mode 100755 salt/common/tools/sbin/so-thehive-user-enable delete mode 100755 salt/common/tools/sbin/so-thehive-user-update diff --git a/salt/common/tools/sbin/so-cortex-restart b/salt/common/tools/sbin/so-cortex-restart deleted file mode 100755 index fe8193bf7..000000000 --- a/salt/common/tools/sbin/so-cortex-restart +++ /dev/null @@ -1,12 +0,0 @@ -#!/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 - -echo "TheHive and its components are no longer part of Security Onion" \ No newline at end of file diff --git a/salt/common/tools/sbin/so-cortex-start b/salt/common/tools/sbin/so-cortex-start deleted file mode 100755 index 25b2c99c5..000000000 --- a/salt/common/tools/sbin/so-cortex-start +++ /dev/null @@ -1,12 +0,0 @@ -#!/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 - -echo "TheHive and its components are no longer part of Security Onion" diff --git a/salt/common/tools/sbin/so-cortex-stop b/salt/common/tools/sbin/so-cortex-stop deleted file mode 100755 index 036ab5689..000000000 --- a/salt/common/tools/sbin/so-cortex-stop +++ /dev/null @@ -1,12 +0,0 @@ -#!/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 - -echo "TheHive and its components are no longer part of Security Onion" diff --git a/salt/common/tools/sbin/so-cortex-user-add b/salt/common/tools/sbin/so-cortex-user-add deleted file mode 100755 index fe8193bf7..000000000 --- a/salt/common/tools/sbin/so-cortex-user-add +++ /dev/null @@ -1,12 +0,0 @@ -#!/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 - -echo "TheHive and its components are no longer part of Security Onion" \ No newline at end of file diff --git a/salt/common/tools/sbin/so-cortex-user-enable b/salt/common/tools/sbin/so-cortex-user-enable deleted file mode 100755 index fe8193bf7..000000000 --- a/salt/common/tools/sbin/so-cortex-user-enable +++ /dev/null @@ -1,12 +0,0 @@ -#!/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 - -echo "TheHive and its components are no longer part of Security Onion" \ No newline at end of file diff --git a/salt/common/tools/sbin/so-thehive-es-restart b/salt/common/tools/sbin/so-thehive-es-restart deleted file mode 100755 index 036ab5689..000000000 --- a/salt/common/tools/sbin/so-thehive-es-restart +++ /dev/null @@ -1,12 +0,0 @@ -#!/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 - -echo "TheHive and its components are no longer part of Security Onion" diff --git a/salt/common/tools/sbin/so-thehive-es-start b/salt/common/tools/sbin/so-thehive-es-start deleted file mode 100755 index feeb5cafd..000000000 --- a/salt/common/tools/sbin/so-thehive-es-start +++ /dev/null @@ -1,12 +0,0 @@ -#!/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 - -echo "TheHive and its components are no longer part of Security Onion" \ No newline at end of file diff --git a/salt/common/tools/sbin/so-thehive-es-stop b/salt/common/tools/sbin/so-thehive-es-stop deleted file mode 100755 index fe8193bf7..000000000 --- a/salt/common/tools/sbin/so-thehive-es-stop +++ /dev/null @@ -1,12 +0,0 @@ -#!/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 - -echo "TheHive and its components are no longer part of Security Onion" \ No newline at end of file diff --git a/salt/common/tools/sbin/so-thehive-restart b/salt/common/tools/sbin/so-thehive-restart deleted file mode 100755 index fe8193bf7..000000000 --- a/salt/common/tools/sbin/so-thehive-restart +++ /dev/null @@ -1,12 +0,0 @@ -#!/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 - -echo "TheHive and its components are no longer part of Security Onion" \ No newline at end of file diff --git a/salt/common/tools/sbin/so-thehive-start b/salt/common/tools/sbin/so-thehive-start deleted file mode 100755 index feeb5cafd..000000000 --- a/salt/common/tools/sbin/so-thehive-start +++ /dev/null @@ -1,12 +0,0 @@ -#!/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 - -echo "TheHive and its components are no longer part of Security Onion" \ No newline at end of file diff --git a/salt/common/tools/sbin/so-thehive-stop b/salt/common/tools/sbin/so-thehive-stop deleted file mode 100755 index fe8193bf7..000000000 --- a/salt/common/tools/sbin/so-thehive-stop +++ /dev/null @@ -1,12 +0,0 @@ -#!/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 - -echo "TheHive and its components are no longer part of Security Onion" \ No newline at end of file diff --git a/salt/common/tools/sbin/so-thehive-user-add b/salt/common/tools/sbin/so-thehive-user-add deleted file mode 100755 index fe8193bf7..000000000 --- a/salt/common/tools/sbin/so-thehive-user-add +++ /dev/null @@ -1,12 +0,0 @@ -#!/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 - -echo "TheHive and its components are no longer part of Security Onion" \ No newline at end of file diff --git a/salt/common/tools/sbin/so-thehive-user-enable b/salt/common/tools/sbin/so-thehive-user-enable deleted file mode 100755 index fe8193bf7..000000000 --- a/salt/common/tools/sbin/so-thehive-user-enable +++ /dev/null @@ -1,12 +0,0 @@ -#!/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 - -echo "TheHive and its components are no longer part of Security Onion" \ No newline at end of file diff --git a/salt/common/tools/sbin/so-thehive-user-update b/salt/common/tools/sbin/so-thehive-user-update deleted file mode 100755 index fe8193bf7..000000000 --- a/salt/common/tools/sbin/so-thehive-user-update +++ /dev/null @@ -1,12 +0,0 @@ -#!/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 - -echo "TheHive and its components are no longer part of Security Onion" \ No newline at end of file