Shellcheck warned about creating content for a python array. As the
string will be printed literally into the config, the warning does not
match to the current case.
The wrapper service will "control" the services added from the
__netbox_* types to provide a general interface. This is more dynamic
than the alias approach used previously. Through this, it is possible
to handle multiple wsgi services for netbox - if this works ..
See as a reference:
http://alesnosek.com/blog/2016/12/04/controlling-a-multi-service-application-with-systemd/
Because someone *want* to use something other than just gunicorn, it was
extracted to a own type. Because gunicorn is a bit deep in the netbox
installation process, it's a bit harder to isolate it.
`__netbox_uwsgi` will come, too.
Some AWK implementations seem to have a problem with parameters named default.
awk: cmd. line:2: function sepafter(f, default, _) {
awk: cmd. line:2: ^ syntax error
awk: cmd. line:5: return _ ? _ : default
awk: cmd. line:5: ^ syntax error
In addition the temp file is removed if an error occurs.
The secret key is generated if it is not set via parameter and the
explorer does not return any. It will be saved in the netbox home
directory to easily read the key for the config generation.
Fixes error message `/opt/netbox/netbox/netbox/settings.py:141:
UserWarning: REMOTE_AUTH_DEFAULT_PERMISSIONS should be a dictionary.
Backward compatibility will be removed in v2.10.`
The working `ls | grep .` like solution was dropped based on the
shellcheck warning. Rather a solution with `find(1)` is used.
As alternative, it could be simply checked if the glob succeeds or not
by test all given arguments if there are existing files. It was dropped
in question if it's really better than the `find(1)` solution.
The ldap config file will be empty (only comments) if no parameter
name set matches `^ldap-*`.
It still generate a ldap config if one or more ldap parameters are set,
but not all basic parameters.
Alpine's DMA package has a typo and installs "newailases" instead of
"newaliases".
I adjusted the code-remote to only run newaliases if it is available.
Otherwise, tough luck, user gotta either fix his system or run manually.