Skip to content

Commit 57ce60a

Browse files
committed
Fix race conditions and typos
1 parent d6c9bf2 commit 57ce60a

9 files changed

+30
-21
lines changed

core/files/configure_misp.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -419,24 +419,24 @@ echo "MISP | Update CA certificates ..." && update_ca_certificates
419419

420420
echo "MISP | Apply minimum configuration directives ..." && init_minimum_config
421421

422-
echo "MISP | Apply DB updates ..." && apply_updates
423-
424422
echo "MISP | Initialize configuration ..." && init_configuration
425423

426424
echo "MISP | Initialize workers ..." && init_workers
427425

426+
echo "MISP | Apply DB updates ..." && apply_updates
427+
428428
echo "MISP | Configure GPG key ..." && configure_gnupg
429429

430430
echo "MISP | Init default user and organization ..." && init_user
431431

432432
echo "MISP | Resolve critical issues ..." && apply_critical_fixes
433433

434+
echo "MISP | Update components ..." && update_components
435+
434436
echo "MISP | Resolve non-critical issues ..." && apply_optional_fixes
435437

436438
echo "MISP | Create sync servers ..." && create_sync_servers
437439

438-
echo "MISP | Update components ..." && update_components
439-
440440
echo "MISP | Set Up OIDC ..." && set_up_oidc
441441

442442
echo "MISP | Set Up LDAP ..." && set_up_ldap

core/files/entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export PHP_MEMORY_LIMIT=${PHP_MEMORY_LIMIT:-2048M}
4141
export PHP_MAX_EXECUTION_TIME=${PHP_MAX_EXECUTION_TIME:-300}
4242
export PHP_UPLOAD_MAX_FILESIZE=${PHP_UPLOAD_MAX_FILESIZE:-50M}
4343
export PHP_POST_MAX_SIZE=${PHP_POST_MAX_SIZE:-50M}
44-
export PHP_MAX_INPUT_TIME:${PHP_MAX_INPUT_TIME:-300}
44+
export PHP_MAX_INPUT_TIME=${PHP_MAX_INPUT_TIME:-300}
4545

4646
# start supervisord using the main configuration file so we have a socket interface
4747
/usr/bin/supervisord -c /etc/supervisor/supervisord.conf

core/files/entrypoint_fpm.sh

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,18 @@ change_php_vars() {
1212
for FILE in /etc/php/*/fpm/php.ini
1313
do
1414
[[ -e $FILE ]] || break
15+
echo "Configure PHP | Setting 'memory_limit = ${PHP_MEMORY_LIMIT}'"
1516
sed -i "s/memory_limit = .*/memory_limit = ${PHP_MEMORY_LIMIT}/" "$FILE"
17+
echo "Configure PHP | Setting 'max_execution_time = ${PHP_MAX_EXECUTION_TIME}'"
1618
sed -i "s/max_execution_time = .*/max_execution_time = ${PHP_MAX_EXECUTION_TIME}/" "$FILE"
19+
echo "Configure PHP | Setting 'upload_max_filesize = ${PHP_UPLOAD_MAX_FILESIZE}'"
1720
sed -i "s/upload_max_filesize = .*/upload_max_filesize = ${PHP_UPLOAD_MAX_FILESIZE}/" "$FILE"
21+
echo "Configure PHP | Setting 'post_max_size = ${PHP_POST_MAX_SIZE}'"
1822
sed -i "s/post_max_size = .*/post_max_size = ${PHP_POST_MAX_SIZE}/" "$FILE"
19-
sed -i "s/max_input_time = .*/max_input_time = ${PHP_MAX_INPUT_TIME}|" "$FILE"
23+
echo "Configure PHP | Setting 'max_input_time = ${PHP_MAX_INPUT_TIME}'"
24+
sed -i "s/max_input_time = .*/max_input_time = ${PHP_MAX_INPUT_TIME}/" "$FILE"
2025
sed -i "s/session.save_handler = .*/session.save_handler = redis/" "$FILE"
26+
echo "Configure PHP | Setting 'session.save_path = '$(echo $REDIS_HOST | grep -E '^\w+://' || echo tcp://$REDIS_HOST):6379?auth=${REDIS_PASSWORD}'"
2127
sed -i "s|.*session.save_path = .*|session.save_path = '$(echo $REDIS_HOST | grep -E '^\w+://' || echo tcp://$REDIS_HOST):6379?auth=${REDIS_PASSWORD}'|" "$FILE"
2228
sed -i "s/session.sid_length = .*/session.sid_length = 64/" "$FILE"
2329
sed -i "s/session.use_strict_mode = .*/session.use_strict_mode = 1/" "$FILE"

core/files/entrypoint_nginx.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -287,5 +287,8 @@ if [[ -x /custom/files/customize_misp.sh ]]; then
287287
/custom/files/customize_misp.sh
288288
fi
289289

290+
# Restart PHP workers
291+
supervisorctl restart php-fpm
292+
290293
# Wait for it
291294
wait "$master_pid"

core/files/etc/misp-docker/initialisation.defaults.json

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -80,9 +80,6 @@
8080
"MISP.event_alert_republish_ban_threshold": {
8181
"default_value": 120
8282
},
83-
"Plugin.ZeroMQ_enable": {
84-
"default_value": false
85-
},
8683
"Plugin.Enrichment_services_enable": {
8784
"default_value": true
8885
},
@@ -98,9 +95,6 @@
9895
"Plugin.Cortex_services_enable": {
9996
"default_value": false
10097
},
101-
"Plugin.Workflow_enable": {
102-
"default_value": true
103-
},
10498
"Security.advanced_authkeys": {
10599
"default_value": true
106100
},

core/files/etc/misp-docker/initialisation.envars.json

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,6 @@
1212
"MISP.contact": {
1313
"default_value": "${SETTING_CONTACT}"
1414
},
15-
"Plugin.ZeroMQ_redis_host": {
16-
"default_value": "${REDIS_HOST}"
17-
},
18-
"Plugin.ZeroMQ_redis_port": {
19-
"default_value": "${REDIS_PORT}"
20-
},
21-
"Plugin.ZeroMQ_redis_password": {
22-
"default_value": "${REDIS_PASSWORD}"
23-
},
2415
"Plugin.Enrichment_services_url": {
2516
"default_value": "${MISP_MODULES_FQDN}"
2617
},

core/files/etc/misp-docker/minimum_config.defaults.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@
3333
"MISP.menu_custom_right_link_html": {
3434
"default_value": ""
3535
},
36+
"Plugin.ZeroMQ_enable": {
37+
"default_value": false
38+
},
3639
"Security.rest_client_enable_arbitrary_urls": {
3740
"default_value": false
3841
},

core/files/etc/misp-docker/minimum_config.envars.json

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,15 @@
1111
"MISP.redis_password": {
1212
"default_value": "${REDIS_PASSWORD}"
1313
},
14+
"Plugin.ZeroMQ_redis_host": {
15+
"default_value": "${REDIS_HOST}"
16+
},
17+
"Plugin.ZeroMQ_redis_port": {
18+
"default_value": "${REDIS_PORT}"
19+
},
20+
"Plugin.ZeroMQ_redis_password": {
21+
"default_value": "${REDIS_PASSWORD}"
22+
},
1423
"GnuPG.binary": {
1524
"default_value": "${GPG_BINARY}"
1625
},

core/files/etc/misp-docker/optional.defaults.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,8 @@
2121
},
2222
"Plugin.Enrichment_hover_timeout": {
2323
"default_value": 5
24+
},
25+
"Plugin.Workflow_enable": {
26+
"default_value": true
2427
}
2528
}

0 commit comments

Comments
 (0)