dietpi-software: SABnzbd: harden config generation#7797
dietpi-software: SABnzbd: harden config generation#7797MichaIng merged 2 commits intoMichaIng:devfrom
Conversation
|
Many thanks. Can you please rebase your commit onto |
The script was modifying the sabnzbd.ini file immediately after starting the service, often before the service had finished writing the initial configuration. This resulted in the script's changes being overwritten. This fix replaces the unreliable 'G_SLEEP 1' with a call to 'Create_Config' that includes 'CREATE_CONFIG_CONTENT=[misc]'. This ensures that the script waits until the '[misc]' section is present in sabnzbd.ini before attempting to modify it, thus resolving the race condition.
552e00a to
1428f00
Compare
|
Just a note: A possible way to achieve the same result is to use Anyway, the asynchronous service termination is unlikely to be the actual issue in this particular SABnzbd case, but that the SIGTERM is coming too early, before the config file has been completed. So the |
The script was modifying the sabnzbd.ini file immediately after starting the service, often before the service had finished writing the initial configuration. This resulted in the script's changes being overwritten.
This fix replaces the unreliable 'G_SLEEP 1' with a call to 'Create_Config' that includes 'CREATE_CONFIG_CONTENT=[misc]'. This ensures that the script waits until the '[misc]' section is present in sabnzbd.ini before attempting to modify it, thus resolving the race condition.