mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-08 10:12:53 +01:00
[fix][wip] Add reinstall_init function (part 3)
Create a function that, if the setup log exists, puts the system into a state where the installer can run again without issue. This is WIP, there are most likely still issues.
This commit is contained in:
@@ -1424,9 +1424,12 @@ reinstall_init() {
|
|||||||
# Disable schedule so highstate doesn't start running during the install
|
# Disable schedule so highstate doesn't start running during the install
|
||||||
salt-call -l info schedule.disable
|
salt-call -l info schedule.disable
|
||||||
|
|
||||||
|
# Kill any currently running salt jobs, also to prevent issues with highstate.
|
||||||
|
salt-call -l info saltutil.kill_all_jobs
|
||||||
|
|
||||||
# Stop and remove all so-* containers so files can be changed with more safety
|
# Stop and remove all so-* containers so files can be changed with more safety
|
||||||
docker stop $(docker ps -a -q --filter "name=so-")
|
docker stop $(docker ps -a -q --filter "name=so-")
|
||||||
docker rm $(docker ps -a -q --filter "name=so-")
|
docker rm -f $(docker ps -a -q --filter "name=so-")
|
||||||
|
|
||||||
# Backup /opt/so since we'll be rebuilding this directory during setup
|
# Backup /opt/so since we'll be rebuilding this directory during setup
|
||||||
mv /opt/so /opt/so_old
|
mv /opt/so /opt/so_old
|
||||||
|
|||||||
Reference in New Issue
Block a user