-
Hi. I build unit 1.31.1-1 from source. I can work fine manipulating Am I missing something? |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 1 reply
-
Hi @drmad Thanks for reaching out! This is how you can initialize the $ curl --unix-socket /var/run/control.unit.sock -X PUT -d '{}' localhost/config/settings/
{
"success": "Reconfiguration done."
} Sorry for this bad experience! We will think about this and will come up with an idea on how to make this better in the future! |
Beta Was this translation helpful? Give feedback.
-
I guess that's because we only initialise the listeners, routes and applications objects at startup. From 513 static const nxt_str_t json = nxt_string(
514 "{ \"listeners\": {}, \"routes\": [], \"applications\": {} }"
515 ); |
Beta Was this translation helpful? Give feedback.
-
It's a combination of the default configuration is (per @ac000 's comment) and the fact that Unit's control API does not create parent objects automatically. At the very least, this behaviour should be documented at https://unit.nginx.org/controlapi/ |
Beta Was this translation helpful? Give feedback.
Hi @drmad Thanks for reaching out!
This is how you can initialize the
settings
objectSorry for this bad experience! We will think about this and will come up with an idea on how to make this better in the future!