Skip to content
This repository has been archived by the owner on Oct 3, 2019. It is now read-only.

Use yum proxy settings to install behind squid3 #88

Open
wants to merge 28 commits into
base: petiepooo
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
f8dfb70
add a script for purging deployed packages
petiepooo Nov 8, 2018
cdc0204
simplify yum.conf gpgcheck update
petiepooo Nov 8, 2018
3fb0537
remove silence on password reads since we will print out later anyway
petiepooo Nov 8, 2018
2c2a906
check before adding hosts entry (idempotent)
petiepooo Nov 8, 2018
13956df
check for ntpd or chrony config before installing (idempotent)
petiepooo Nov 8, 2018
003e176
global yum update is a maint task, not install
petiepooo Nov 8, 2018
db6a579
use tee for all root file writes rather than subshell
petiepooo Nov 8, 2018
8fb6c57
capture proxy from yum (prepwork)
petiepooo Nov 8, 2018
ba28995
move firewalld install down by its config (prepwork)
petiepooo Nov 8, 2018
77da1fd
reload daemons after installing chrony
petiepooo Nov 8, 2018
64593b3
make murmur install idempotent
petiepooo Nov 8, 2018
61c1611
make mattermost install idempotent
petiepooo Nov 8, 2018
04ceb49
make hackmd install idempotent
petiepooo Nov 9, 2018
3f70a60
make gitea install idempotent
petiepooo Nov 9, 2018
aa6e470
make elasticsearch+thehive+cortex install idempotent (WIP)
petiepooo Nov 9, 2018
6801c26
add more proxy variants
petiepooo Nov 9, 2018
def49dd
continue with elasticsearch install updates
petiepooo Nov 9, 2018
52d6a6d
add mkdir guard before writing files with tee
petiepooo Nov 9, 2018
912ffcb
move service starts to just after each install
petiepooo Nov 9, 2018
f508494
edit index.html after copy instead of in install dir
petiepooo Nov 9, 2018
d417ad6
add hackmd icon and section on landing page
petiepooo Nov 9, 2018
d583819
update removals in purge script
petiepooo Nov 9, 2018
b8807d1
silence the is-active service checks
petiepooo Nov 9, 2018
f6732ea
get es plugins install working with a proxy
petiepooo Nov 9, 2018
1a52097
correct missing tee append that was breaking thehive install
petiepooo Nov 9, 2018
f396b29
change confi path for thehive key so it starts
petiepooo Nov 9, 2018
505e7b6
use remove instead of erase when purging
petiepooo Nov 12, 2018
7f0e2a6
remove yarn related temp files after use
petiepooo Nov 12, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
75 changes: 75 additions & 0 deletions purge_capes.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
#!/bin/bash

# warn user
read -p "
WARNING: pressing enter now will attempt to remove all customization
performed by the deploy script. Press Ctrl-C now to abort." VAR

# stop all the services
sudo systemctl stop mattermost.service
sudo systemctl stop filebeat.service
sudo systemctl stop metricbeat.service
sudo systemctl stop heartbeat.service
sudo systemctl stop nginx.service
sudo systemctl stop murmur.service
sudo systemctl stop thehive.service
sudo systemctl stop hackmd.service
sudo systemctl stop gitea.service
sudo systemctl stop cortex.service
sudo systemctl stop kibana.service
sudo systemctl stop elasticsearch.service

# disable all the services
sudo systemctl disable mattermost.service
sudo systemctl disable filebeat.service
sudo systemctl disable metricbeat.service
sudo systemctl disable heartbeat.service
sudo systemctl disable nginx.service
sudo systemctl disable murmur.service
sudo systemctl disable thehive.service
sudo systemctl disable hackmd.service
sudo systemctl disable gitea.service
sudo systemctl disable cortex.service
sudo systemctl disable kibana.service
sudo systemctl disable elasticsearch.service

# TODO: need to rewrite conf file with a D or R?
#sudo systemd-tmpfiles --create /etc/tmpfiles.d/murmur.conf

#sudo firewall-cmd --remove-port=80/tcp --remove-port=3000/tcp --remove-port=4000/tcp --remove-port=5000/tcp --remove-port=5601/tcp --remove-port=9000/tcp --remove-port=9001/tcp --remove-port=7000/tcp --remove-port=7000/udp --permanent
#sudo firewall-cmd --reload

sudo yum erase -y kibana-5.6.5 metricbeat-5.6.5 filebeat-5.6.5 heartbeat-5.6.5
peasead marked this conversation as resolved.
Show resolved Hide resolved
sudo rm -f -r /etc/filebeat/ /etc/heartbeat/ /etc/metricbeat/ /etc/kibana/

sudo rm -f /usr/share/nginx/html/cyberchef.htm

sudo yum erase -y nginx httpd-tools
sudo rm -f -r /usr/share/nginx/html/*
sudo rm -f -r /etc/nginx/

sudo yum erase -y thehive cortex
sudo rm -f /etc/thehive/application.conf* /etc/cortex/application.conf*
sudo rmdir /etc/cortex/ /etc/thehive/ /opt/cortex/* /opt/cortex/ /opt/thehive/* /opt/thehive/

sudo yum erase -y elasticsearch-5.6.0
sudo rm -f /etc/elasticsearch/elasticsearch.yml*

sudo rm -f /etc/systemd/system/gitea.service*
sudo rm -f -r /opt/gitea
mysql -uroot -e "DROP DATABASE gitea;"
sudo yum erase -y wandisco-git-release-7-2

mysql -uroot -e "DROP DATABASE hackmd;"
sudo rm -f /etc/systemd/system/hackmd.service*
sudo rm -f -r /opt/hackmd

mysql -uroot -e "DROP DATABASE mattermost;"
sudo rm -f /etc/systemd/system/mattermost.service*
sudo rmdir /opt/mattermost/data /opt/mattermost/

sudo rm -f /etc/tmpfiles.d/murmur.conf* /etc/systemd/system/murmur.service* /etc/logrotate.d/murmur* /etc/murmur.ini*
sudo rm -f -r /opt/murmur /var/log/murmur

echo MariaDB has not been uninstalled.
echo dependencies of the main packages have not been uninstalled.