2020-08-27 17:46:09 +00:00
|
|
|
#!/bin/sh -e
|
|
|
|
|
2020-09-05 19:48:04 +00:00
|
|
|
# *bind* parameters are directly processed in the gen script
|
|
|
|
if [ -f "$__object/parameter/serve-static" ]; then
|
|
|
|
STATIC_MAP="yes"
|
|
|
|
export STATIC_MAP
|
|
|
|
fi
|
|
|
|
|
2020-08-27 17:46:09 +00:00
|
|
|
# process template
|
|
|
|
mkdir "$__object/files"
|
|
|
|
"$__type/files/uwsgi.ini.sh" > "$__object/files/uwsgi.ini"
|
|
|
|
|
|
|
|
# uwsgi config file
|
|
|
|
# TODO maybe patching with __key_value cause of .ini ?
|
|
|
|
__file /opt/netbox/uwsgi.ini \
|
2020-09-05 20:27:42 +00:00
|
|
|
--mode 644 --owner netbox \
|
|
|
|
--source "$__object/files/uwsgi.ini"
|
2020-08-27 17:46:09 +00:00
|
|
|
|
|
|
|
# install service file
|
|
|
|
__systemd_unit uwsgi-netbox.service \
|
|
|
|
--source "$__type/files/netbox.service" \
|
|
|
|
--enablement-state enabled --restart
|