Multi OS Support

This commit is contained in:
Mike Reeves
2023-07-13 15:05:51 -04:00
45 changed files with 3361 additions and 1351 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -1534,18 +1534,6 @@ create_sensoroni_pillar() {
}
create_strelka_pillar() {
title "Create the Strelka pillar file"
touch $adv_strelka_pillar_file
printf '%s\n'\
"strelka:"\
" enabled: $STRELKA"\
" rules: 1" > "$strelka_pillar_file"
printf '%s\n'\
" repos:"\
" - 'https://$HOSTNAME:7788/yara'" >> "$strelka_pillar_file"
}
backup_pillar() {
title "Create the backup pillar file"
touch $adv_backup_pillar_file
@@ -2133,6 +2121,12 @@ saltify() {
logCmd "mkdir -p /etc/salt/minion.d"
logCmd "salt-pip install docker --no-index --only-binary=:all: --find-links files/salt_module_deps/docker/"
logCmd "salt-pip install pymysql --no-index --only-binary=:all: --find-links files/salt_module_deps/pymysql/"
# this can be removed when https://github.com/saltstack/salt/issues/64195 is resolved
if [ $SALTVERSION == "3006.1" ]; then
info "Salt version 3006.1 found. Patching /opt/saltstack/salt/lib/python3.10/site-packages/salt/states/x509_v2.py"
\cp -v ./files/patch/states/x509_v2.py /opt/saltstack/salt/lib/python3.10/site-packages/salt/states/x509_v2.py
fi
}

View File

@@ -660,13 +660,14 @@ if ! [[ -f $install_opt_file ]]; then
logCmd "salt-call state.apply -l info manager"
logCmd "salt-call state.apply influxdb -l info"
logCmd "salt-call state.highstate -l info"
logCmd "salt-call schedule.disable -linfo --local"
if [[ ! $is_airgap ]]; then
title "Downloading IDS Rules"
logCmd "so-rule-update"
title "Restarting Suricata to pick up the new rules"
logCmd "so-suricata-restart"
title "Downloading YARA rules"
logCmd "runuser -l socore 'so-yara-update'"
logCmd "su socore -c '/usr/sbin/so-yara-download'"
title "Restarting Strelka to use new rules"
logCmd "so-strelka-restart"
fi
@@ -684,6 +685,7 @@ if ! [[ -f $install_opt_file ]]; then
fi
checkin_at_boot
set_initial_firewall_access
logCmd "salt-call schedule.enable -linfo --local"
systemctl restart salt-master
systemctl restart salt-minion
verify_setup