Fix race conditions and typos

pull/137/head
Stefano Ortolani 2024-08-25 12:32:36 +01:00
parent d6c9bf200e
commit 57ce60ab66
9 changed files with 30 additions and 21 deletions

View File

@ -419,24 +419,24 @@ echo "MISP | Update CA certificates ..." && update_ca_certificates
echo "MISP | Apply minimum configuration directives ..." && init_minimum_config
echo "MISP | Apply DB updates ..." && apply_updates
echo "MISP | Initialize configuration ..." && init_configuration
echo "MISP | Initialize workers ..." && init_workers
echo "MISP | Apply DB updates ..." && apply_updates
echo "MISP | Configure GPG key ..." && configure_gnupg
echo "MISP | Init default user and organization ..." && init_user
echo "MISP | Resolve critical issues ..." && apply_critical_fixes
echo "MISP | Update components ..." && update_components
echo "MISP | Resolve non-critical issues ..." && apply_optional_fixes
echo "MISP | Create sync servers ..." && create_sync_servers
echo "MISP | Update components ..." && update_components
echo "MISP | Set Up OIDC ..." && set_up_oidc
echo "MISP | Set Up LDAP ..." && set_up_ldap

View File

@ -41,7 +41,7 @@ export PHP_MEMORY_LIMIT=${PHP_MEMORY_LIMIT:-2048M}
export PHP_MAX_EXECUTION_TIME=${PHP_MAX_EXECUTION_TIME:-300}
export PHP_UPLOAD_MAX_FILESIZE=${PHP_UPLOAD_MAX_FILESIZE:-50M}
export PHP_POST_MAX_SIZE=${PHP_POST_MAX_SIZE:-50M}
export PHP_MAX_INPUT_TIME:${PHP_MAX_INPUT_TIME:-300}
export PHP_MAX_INPUT_TIME=${PHP_MAX_INPUT_TIME:-300}
# start supervisord using the main configuration file so we have a socket interface
/usr/bin/supervisord -c /etc/supervisor/supervisord.conf

View File

@ -12,12 +12,18 @@ change_php_vars() {
for FILE in /etc/php/*/fpm/php.ini
do
[[ -e $FILE ]] || break
echo "Configure PHP | Setting 'memory_limit = ${PHP_MEMORY_LIMIT}'"
sed -i "s/memory_limit = .*/memory_limit = ${PHP_MEMORY_LIMIT}/" "$FILE"
echo "Configure PHP | Setting 'max_execution_time = ${PHP_MAX_EXECUTION_TIME}'"
sed -i "s/max_execution_time = .*/max_execution_time = ${PHP_MAX_EXECUTION_TIME}/" "$FILE"
echo "Configure PHP | Setting 'upload_max_filesize = ${PHP_UPLOAD_MAX_FILESIZE}'"
sed -i "s/upload_max_filesize = .*/upload_max_filesize = ${PHP_UPLOAD_MAX_FILESIZE}/" "$FILE"
echo "Configure PHP | Setting 'post_max_size = ${PHP_POST_MAX_SIZE}'"
sed -i "s/post_max_size = .*/post_max_size = ${PHP_POST_MAX_SIZE}/" "$FILE"
sed -i "s/max_input_time = .*/max_input_time = ${PHP_MAX_INPUT_TIME}|" "$FILE"
echo "Configure PHP | Setting 'max_input_time = ${PHP_MAX_INPUT_TIME}'"
sed -i "s/max_input_time = .*/max_input_time = ${PHP_MAX_INPUT_TIME}/" "$FILE"
sed -i "s/session.save_handler = .*/session.save_handler = redis/" "$FILE"
echo "Configure PHP | Setting 'session.save_path = '$(echo $REDIS_HOST | grep -E '^\w+://' || echo tcp://$REDIS_HOST):6379?auth=${REDIS_PASSWORD}'"
sed -i "s|.*session.save_path = .*|session.save_path = '$(echo $REDIS_HOST | grep -E '^\w+://' || echo tcp://$REDIS_HOST):6379?auth=${REDIS_PASSWORD}'|" "$FILE"
sed -i "s/session.sid_length = .*/session.sid_length = 64/" "$FILE"
sed -i "s/session.use_strict_mode = .*/session.use_strict_mode = 1/" "$FILE"

View File

@ -287,5 +287,8 @@ if [[ -x /custom/files/customize_misp.sh ]]; then
/custom/files/customize_misp.sh
fi
# Restart PHP workers
supervisorctl restart php-fpm
# Wait for it
wait "$master_pid"

View File

@ -80,9 +80,6 @@
"MISP.event_alert_republish_ban_threshold": {
"default_value": 120
},
"Plugin.ZeroMQ_enable": {
"default_value": false
},
"Plugin.Enrichment_services_enable": {
"default_value": true
},
@ -98,9 +95,6 @@
"Plugin.Cortex_services_enable": {
"default_value": false
},
"Plugin.Workflow_enable": {
"default_value": true
},
"Security.advanced_authkeys": {
"default_value": true
},

View File

@ -12,15 +12,6 @@
"MISP.contact": {
"default_value": "${SETTING_CONTACT}"
},
"Plugin.ZeroMQ_redis_host": {
"default_value": "${REDIS_HOST}"
},
"Plugin.ZeroMQ_redis_port": {
"default_value": "${REDIS_PORT}"
},
"Plugin.ZeroMQ_redis_password": {
"default_value": "${REDIS_PASSWORD}"
},
"Plugin.Enrichment_services_url": {
"default_value": "${MISP_MODULES_FQDN}"
},

View File

@ -33,6 +33,9 @@
"MISP.menu_custom_right_link_html": {
"default_value": ""
},
"Plugin.ZeroMQ_enable": {
"default_value": false
},
"Security.rest_client_enable_arbitrary_urls": {
"default_value": false
},

View File

@ -11,6 +11,15 @@
"MISP.redis_password": {
"default_value": "${REDIS_PASSWORD}"
},
"Plugin.ZeroMQ_redis_host": {
"default_value": "${REDIS_HOST}"
},
"Plugin.ZeroMQ_redis_port": {
"default_value": "${REDIS_PORT}"
},
"Plugin.ZeroMQ_redis_password": {
"default_value": "${REDIS_PASSWORD}"
},
"GnuPG.binary": {
"default_value": "${GPG_BINARY}"
},

View File

@ -21,5 +21,8 @@
},
"Plugin.Enrichment_hover_timeout": {
"default_value": 5
},
"Plugin.Workflow_enable": {
"default_value": true
}
}