mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
[fix] Put conditions in install_cleanup function
This commit is contained in:
@@ -1011,18 +1011,22 @@ host_pillar() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
install_cleanup() {
|
install_cleanup() {
|
||||||
|
if [ -f "$temp_install_dir" ]; then
|
||||||
echo "Installer removing the following files:"
|
echo "Installer removing the following files:"
|
||||||
ls -lR "$temp_install_dir"
|
ls -lR "$temp_install_dir"
|
||||||
|
|
||||||
# Clean up after ourselves
|
# Clean up after ourselves
|
||||||
rm -rf "$temp_install_dir"
|
rm -rf "$temp_install_dir"
|
||||||
|
fi
|
||||||
|
|
||||||
# All cleanup prior to this statement must be compatible with automated testing. Cleanup
|
# All cleanup prior to this statement must be compatible with automated testing. Cleanup
|
||||||
# that will disrupt automated tests should be placed beneath this statement.
|
# that will disrupt automated tests should be placed beneath this statement.
|
||||||
[ -n "$TESTING" ] && return
|
[ -n "$TESTING" ] && return
|
||||||
|
|
||||||
# If Mysql is running stop it
|
# If Mysql is running stop it
|
||||||
|
if docker ps --format "{{.Names}}" 2>&1 | grep -q "so-mysql"; then
|
||||||
/usr/sbin/so-mysql-stop
|
/usr/sbin/so-mysql-stop
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ $setup_type == 'iso' ]]; then
|
if [[ $setup_type == 'iso' ]]; then
|
||||||
info "Removing so-setup permission entry from sudoers file"
|
info "Removing so-setup permission entry from sudoers file"
|
||||||
|
|||||||
Reference in New Issue
Block a user