mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-07 17:52:46 +01:00
add states to remove ca and ssl keys and certs and call them during reinstall.
This commit is contained in:
@@ -2060,7 +2060,7 @@ reinstall_init() {
|
||||
|
||||
{
|
||||
# remove all of root's cronjobs
|
||||
crontab -r -u root
|
||||
logCmd "crontab -r -u root"
|
||||
|
||||
if command -v salt-call &> /dev/null && grep -q "master:" /etc/salt/minion 2> /dev/null; then
|
||||
# Disable schedule so highstate doesn't start running during the install
|
||||
@@ -2091,6 +2091,9 @@ reinstall_init() {
|
||||
done
|
||||
done
|
||||
|
||||
logCmd "salt-call state.apply ca.remove -linfo --local"
|
||||
logCmd "salt-call state.apply ssl.remove -linfo --local"
|
||||
|
||||
# Remove all salt configs
|
||||
rm -rf /etc/salt/engines/* /etc/salt/grains /etc/salt/master /etc/salt/master.d/* /etc/salt/minion /etc/salt/minion.d/* /etc/salt/pki/* /etc/salt/proxy /etc/salt/proxy.d/* /var/cache/salt/
|
||||
|
||||
@@ -2122,10 +2125,13 @@ reinstall_init() {
|
||||
remove_package launcher-final
|
||||
|
||||
if [[ $OS == 'ubuntu' ]]; then
|
||||
info "Unholding previously held packages."
|
||||
apt-mark unhold $(apt-mark showhold)
|
||||
fi
|
||||
|
||||
} >> "$setup_log" 2>&1
|
||||
|
||||
info "System reinstall init has been completed."
|
||||
}
|
||||
|
||||
reset_proxy() {
|
||||
|
||||
Reference in New Issue
Block a user