nginx: fix problem with migration of uci conf template
authorChristian Marangi <ansuelsmth@gmail.com>
Sun, 11 Jun 2023 02:29:54 +0000 (04:29 +0200)
committerChristian Marangi <ansuelsmth@gmail.com>
Sun, 11 Jun 2023 02:36:12 +0000 (04:36 +0200)
commitadd3cbfcd3dfb1ce64d5d6f67a831c6410b99776
tree5f054f17d9ef5b5c6a03554495376bdaa7dd9b8e
parent15271cb46794f79681b993ffe719400d02c71d3b
nginx: fix problem with migration of uci conf template

Fix some problem with migration of uci conf template and include of
module.d directive.

Fix 2 case:
- uci.conf.template not versioned but with the include module.d
  resulting in double include module.d

- uci.conf.template version 1.1 with the include module.d at the end
  of the config. This is problematic for nginx as modules must be
  included before any http directive.

Handle this 2 case to restore a working uci.conf.template configuration
on migrated config.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
net/nginx/Makefile
net/nginx/files/nginx.init