From e79f5ef3be124bbf030b58f9814822d1b06b1d13 Mon Sep 17 00:00:00 2001 From: Mike Reeves Date: Thu, 10 Jan 2019 11:58:20 -0500 Subject: [PATCH] Tools Module - Adding start and restart scripts --- salt/common/tools/sbin/so-bro-restart | 17 +++++++++++++++++ salt/common/tools/sbin/so-bro-start | 17 +++++++++++++++++ salt/common/tools/sbin/so-bro-stop | 17 +++++++++++++++++ salt/common/tools/{ => sbin}/so-brologs | 0 salt/common/tools/{ => sbin}/so-checkin | 0 salt/common/tools/sbin/so-filebeat-restart | 17 +++++++++++++++++ salt/common/tools/sbin/so-filebeat-start | 17 +++++++++++++++++ salt/common/tools/sbin/so-filebeat-stop | 17 +++++++++++++++++ salt/common/tools/{ => sbin}/so-getparsed | 0 salt/common/tools/{ => sbin}/so-getunparsed | 0 salt/common/tools/{ => sbin}/so-listindex | 0 salt/common/tools/{ => sbin}/so-start | 0 salt/common/tools/sbin/so-suricata-restart | 17 +++++++++++++++++ salt/common/tools/sbin/so-suricata-start | 17 +++++++++++++++++ salt/common/tools/sbin/so-suricata-stop | 17 +++++++++++++++++ salt/common/tools/sbin/so-wazuh-restart | 17 +++++++++++++++++ salt/common/tools/sbin/so-wazuh-start | 17 +++++++++++++++++ salt/common/tools/sbin/so-wazuh-stop | 17 +++++++++++++++++ so-setup-network.sh | 2 +- 19 files changed, 205 insertions(+), 1 deletion(-) create mode 100644 salt/common/tools/sbin/so-bro-restart create mode 100644 salt/common/tools/sbin/so-bro-start create mode 100644 salt/common/tools/sbin/so-bro-stop rename salt/common/tools/{ => sbin}/so-brologs (100%) rename salt/common/tools/{ => sbin}/so-checkin (100%) create mode 100644 salt/common/tools/sbin/so-filebeat-restart create mode 100644 salt/common/tools/sbin/so-filebeat-start create mode 100644 salt/common/tools/sbin/so-filebeat-stop rename salt/common/tools/{ => sbin}/so-getparsed (100%) rename salt/common/tools/{ => sbin}/so-getunparsed (100%) rename salt/common/tools/{ => sbin}/so-listindex (100%) rename salt/common/tools/{ => sbin}/so-start (100%) create mode 100644 salt/common/tools/sbin/so-suricata-restart create mode 100644 salt/common/tools/sbin/so-suricata-start create mode 100644 salt/common/tools/sbin/so-suricata-stop create mode 100644 salt/common/tools/sbin/so-wazuh-restart create mode 100644 salt/common/tools/sbin/so-wazuh-start create mode 100644 salt/common/tools/sbin/so-wazuh-stop diff --git a/salt/common/tools/sbin/so-bro-restart b/salt/common/tools/sbin/so-bro-restart new file mode 100644 index 000000000..8161b7cb3 --- /dev/null +++ b/salt/common/tools/sbin/so-bro-restart @@ -0,0 +1,17 @@ +#!/bin/bash + +# Copyright 2014,2015,2016,2017,2018, 2019 Security Onion Solutions, LLC + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +docker stop so-bro && sudo docker rm so-bro && salt-call state.apply bro diff --git a/salt/common/tools/sbin/so-bro-start b/salt/common/tools/sbin/so-bro-start new file mode 100644 index 000000000..87a47febe --- /dev/null +++ b/salt/common/tools/sbin/so-bro-start @@ -0,0 +1,17 @@ +#!/bin/bash + +# Copyright 2014,2015,2016,2017,2018, 2019 Security Onion Solutions, LLC + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +docker rm so-bro && salt-call state.apply bro diff --git a/salt/common/tools/sbin/so-bro-stop b/salt/common/tools/sbin/so-bro-stop new file mode 100644 index 000000000..62bc2e1b1 --- /dev/null +++ b/salt/common/tools/sbin/so-bro-stop @@ -0,0 +1,17 @@ +#!/bin/bash + +# Copyright 2014,2015,2016,2017,2018, 2019 Security Onion Solutions, LLC + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +docker stop so-bro diff --git a/salt/common/tools/so-brologs b/salt/common/tools/sbin/so-brologs similarity index 100% rename from salt/common/tools/so-brologs rename to salt/common/tools/sbin/so-brologs diff --git a/salt/common/tools/so-checkin b/salt/common/tools/sbin/so-checkin similarity index 100% rename from salt/common/tools/so-checkin rename to salt/common/tools/sbin/so-checkin diff --git a/salt/common/tools/sbin/so-filebeat-restart b/salt/common/tools/sbin/so-filebeat-restart new file mode 100644 index 000000000..85faf7499 --- /dev/null +++ b/salt/common/tools/sbin/so-filebeat-restart @@ -0,0 +1,17 @@ +#!/bin/bash + +# Copyright 2014,2015,2016,2017,2018, 2019 Security Onion Solutions, LLC + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +docker stop so-filebeat && sudo docker rm so-filebeat && salt-call state.apply filebeat diff --git a/salt/common/tools/sbin/so-filebeat-start b/salt/common/tools/sbin/so-filebeat-start new file mode 100644 index 000000000..e5ce6ed88 --- /dev/null +++ b/salt/common/tools/sbin/so-filebeat-start @@ -0,0 +1,17 @@ +#!/bin/bash + +# Copyright 2014,2015,2016,2017,2018, 2019 Security Onion Solutions, LLC + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +docker rm so-filebeat && salt-call state.apply filebeat diff --git a/salt/common/tools/sbin/so-filebeat-stop b/salt/common/tools/sbin/so-filebeat-stop new file mode 100644 index 000000000..3b7419db7 --- /dev/null +++ b/salt/common/tools/sbin/so-filebeat-stop @@ -0,0 +1,17 @@ +#!/bin/bash + +# Copyright 2014,2015,2016,2017,2018, 2019 Security Onion Solutions, LLC + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +docker stop so-filebeat diff --git a/salt/common/tools/so-getparsed b/salt/common/tools/sbin/so-getparsed similarity index 100% rename from salt/common/tools/so-getparsed rename to salt/common/tools/sbin/so-getparsed diff --git a/salt/common/tools/so-getunparsed b/salt/common/tools/sbin/so-getunparsed similarity index 100% rename from salt/common/tools/so-getunparsed rename to salt/common/tools/sbin/so-getunparsed diff --git a/salt/common/tools/so-listindex b/salt/common/tools/sbin/so-listindex similarity index 100% rename from salt/common/tools/so-listindex rename to salt/common/tools/sbin/so-listindex diff --git a/salt/common/tools/so-start b/salt/common/tools/sbin/so-start similarity index 100% rename from salt/common/tools/so-start rename to salt/common/tools/sbin/so-start diff --git a/salt/common/tools/sbin/so-suricata-restart b/salt/common/tools/sbin/so-suricata-restart new file mode 100644 index 000000000..0fabe198c --- /dev/null +++ b/salt/common/tools/sbin/so-suricata-restart @@ -0,0 +1,17 @@ +#!/bin/bash + +# Copyright 2014,2015,2016,2017,2018, 2019 Security Onion Solutions, LLC + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +docker stop so-suricata && sudo docker rm so-suricata && salt-call state.apply suricata diff --git a/salt/common/tools/sbin/so-suricata-start b/salt/common/tools/sbin/so-suricata-start new file mode 100644 index 000000000..dd9bd8df9 --- /dev/null +++ b/salt/common/tools/sbin/so-suricata-start @@ -0,0 +1,17 @@ +#!/bin/bash + +# Copyright 2014,2015,2016,2017,2018, 2019 Security Onion Solutions, LLC + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +docker rm so-suricata && salt-call state.apply suricata diff --git a/salt/common/tools/sbin/so-suricata-stop b/salt/common/tools/sbin/so-suricata-stop new file mode 100644 index 000000000..8f0383164 --- /dev/null +++ b/salt/common/tools/sbin/so-suricata-stop @@ -0,0 +1,17 @@ +#!/bin/bash + +# Copyright 2014,2015,2016,2017,2018, 2019 Security Onion Solutions, LLC + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +docker stop so-suricata diff --git a/salt/common/tools/sbin/so-wazuh-restart b/salt/common/tools/sbin/so-wazuh-restart new file mode 100644 index 000000000..3183479c4 --- /dev/null +++ b/salt/common/tools/sbin/so-wazuh-restart @@ -0,0 +1,17 @@ +#!/bin/bash + +# Copyright 2014,2015,2016,2017,2018, 2019 Security Onion Solutions, LLC + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +docker stop so-wazuh && sudo docker rm so-wazuh && salt-call state.apply wazuh diff --git a/salt/common/tools/sbin/so-wazuh-start b/salt/common/tools/sbin/so-wazuh-start new file mode 100644 index 000000000..195287314 --- /dev/null +++ b/salt/common/tools/sbin/so-wazuh-start @@ -0,0 +1,17 @@ +#!/bin/bash + +# Copyright 2014,2015,2016,2017,2018, 2019 Security Onion Solutions, LLC + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +docker rm so-wazuh && salt-call state.apply wazuh diff --git a/salt/common/tools/sbin/so-wazuh-stop b/salt/common/tools/sbin/so-wazuh-stop new file mode 100644 index 000000000..dd64354c7 --- /dev/null +++ b/salt/common/tools/sbin/so-wazuh-stop @@ -0,0 +1,17 @@ +#!/bin/bash + +# Copyright 2014,2015,2016,2017,2018, 2019 Security Onion Solutions, LLC + +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program. If not, see . +docker stop so-wazuh diff --git a/so-setup-network.sh b/so-setup-network.sh index de978e94a..ea37b89c5 100644 --- a/so-setup-network.sh +++ b/so-setup-network.sh @@ -1,6 +1,6 @@ #!/bin/bash -# Copyright 2014,2015,2016,2017,2018 Security Onion Solutions, LLC +# Copyright 2014,2015,2016,2017,2018, 2019 Security Onion Solutions, LLC # This program is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by