Jertel Compliance

This commit is contained in:
Mike Reeves
2021-05-03 15:23:34 -04:00
parent 074fe46e90
commit a489b369d7
3 changed files with 15 additions and 14 deletions

View File

@@ -47,14 +47,14 @@ else
exit 1
else
echo "We need to apply a hotfix"
rsync -a $HOTFIXDIR/salt /opt/so/saltstack/default/
rsync -a $HOTFIXDIR/pillar /opt/so/saltstack/default/
chown -R socore:socore /opt/so/saltstack/default/
chmod 755 /opt/so/saltstack/default/pillar/firewall/addfirewall.sh
cd $HOTFIXDIR
DEFAULT_SALT_DIR=/opt/so/saltstack/default
copy_new_files
echo $HOTFIXVERSION > /etc/sohotfix
salt-call state.highstate -l info queue=True
echo "The Hotfix $HOTFIXVERSION has been applied"
# Clean up
cd /tmp
rm -rf $HOTFIXDIR
exit 0
fi

View File

@@ -122,6 +122,14 @@ check_elastic_license() {
fi
}
copy_new_files() {
# Copy new files over to the salt dir
rsync -a salt $DEFAULT_SALT_DIR/
rsync -a pillar $DEFAULT_SALT_DIR/
chown -R socore:socore $DEFAULT_SALT_DIR/
chmod 755 $DEFAULT_SALT_DIR/pillar/firewall/addfirewall.sh
}
disable_fastestmirror() {
sed -i 's/enabled=1/enabled=0/' /etc/yum/pluginconf.d/fastestmirror.conf
}

View File

@@ -214,16 +214,6 @@ clone_to_tmp() {
fi
}
copy_new_files() {
# Copy new files over to the salt dir
cd $UPDATE_DIR
rsync -a salt $DEFAULT_SALT_DIR/
rsync -a pillar $DEFAULT_SALT_DIR/
chown -R socore:socore $DEFAULT_SALT_DIR/
chmod 755 $DEFAULT_SALT_DIR/pillar/firewall/addfirewall.sh
cd /tmp
}
generate_and_clean_tarballs() {
local new_version
new_version=$(cat $UPDATE_DIR/VERSION)
@@ -724,7 +714,9 @@ upgrade_check_salt
if [[ $is_hotfix ]]; then
echo "Applying $HOTFIXVERSION"
cd $UPDATE_DIR
copy_new_files
cd /tmp
echo ""
update_version
salt-call state.highstate -l info queue=True
@@ -795,6 +787,7 @@ else
echo ""
echo "Copying new Security Onion code from $UPDATE_DIR to $DEFAULT_SALT_DIR."
copy_new_files
cd /tmp
echo ""
update_version