Line 165: |
Line 165: |
| Here's how to go about creating a custom template: | | Here's how to go about creating a custom template: |
| | | |
− | 1) Identify the service performing the task I want to customize
| + | # Identify the service performing the task I want to customize |
− | | + | # Identify the configuration file that needs to be customized |
− | 2) Identify the configuration file that needs to be customized
| + | # Change the config file manually |
− | | + | # Restart the affected service |
− | 3) Change the config file manually
| + | # Verify that restarting the service did not return the config file to the original configuration (dnscache, for example, regenerates .../dnscache/root/servers each time the service is restarted) |
− | | + | # Verify that the change introduced, fixes the problem I am addressing |
− | 4) Restart the affected service
| + | # Locate the default template fragment that generates the piece of the config file I want to modify |
− | | + | # Copy the default template fragment into the appropriate .../templates-custom/... folder tree |
− | 5) Verify that restarting the service did not return the config file to the original configuration (dnscache, for example, regenerates .../dnscache/root/servers each time the service is restarted)
| + | # Edit the .../templates-custom/... copy of the template fragment |
− | | + | # Use expand-template to regenerate the target config file |
− | 6) Verify that the change introduced, fixes the problem I am addressing
| + | # Verify (using file date and time, or by using a slightly different value for the new parameter than was used in step 3) that the config file now contains the output generated by the new custom template fragement. |
− | | + | # Re-test |
− | 7) Locate the default template fragment that generates the piece of the config file I want to modify
| + | # Document the operation in the wiki if it seems to me that the info would be useful to others |
− | | |
− | 8) Copy the default template fragment into the appropriate .../templates-custom/... folder tree
| |
− | | |
− | 9) Edit the .../templates-custom/... copy of the template fragment
| |
− | | |
− | 10) Use expand-template to regenerate the target config file
| |
− | | |
− | 11) Verify (using file date and time, or by using a slightly different value for the new parameter than was used in step 3) that the config file now contains the output generated by the new custom template fragement.
| |
− | | |
− | 12) Re-test
| |
− | | |
− | 13) Document the operation in the wiki if it seems to me that the info would be useful to others
| |
| | | |
| Not every config option of every program is templated; for example, there is no template (that I can find) to control /var/service/qpsmtpd/config. | | Not every config option of every program is templated; for example, there is no template (that I can find) to control /var/service/qpsmtpd/config. |