__netbox_uwsgi: fix shellcheck
Fixed shellcheck cause of the find command. This required a bigger change due to variables and subshell. Now, input is used through a here-document.
This commit is contained in:
parent
755bd9098e
commit
5a403de057
2 changed files with 7 additions and 6 deletions
|
@ -29,10 +29,14 @@ cat << EOF
|
|||
EOF
|
||||
|
||||
# special protocol to bind
|
||||
for param in $(find "$__object/parameter/" -maxdepth 1 -name "*-bind" -print); do
|
||||
while read -r param; do
|
||||
multi_options "$(basename "$param" | awk -F'-' '{print $1}')-socket" "$param"
|
||||
socket_changes=yes
|
||||
done
|
||||
socket_changes="yes"
|
||||
|
||||
done << INPUT # here-doc cause of SC2031
|
||||
$( find "$__object/parameter/" -maxdepth 1 -name "*-bind" -print )
|
||||
INPUT
|
||||
|
||||
# else, default bind to
|
||||
if [ -z "$socket_changes" ]; then
|
||||
multi_options "socket" "$__object/parameter/bind-to"
|
||||
|
|
|
@ -1,8 +1,5 @@
|
|||
#!/bin/sh -e
|
||||
|
||||
HOST="$__object/parameter/bind-to"
|
||||
export HOST
|
||||
|
||||
# process template
|
||||
mkdir "$__object/files"
|
||||
"$__type/files/uwsgi.ini.sh" > "$__object/files/uwsgi.ini"
|
||||
|
|
Loading…
Reference in a new issue