resolved ordering error in subst for nginx phphander
updating .insert first then copying to nginx.conf
This commit is contained in:
parent
45379c4908
commit
db8662c7fc
6
.vscode/numbered-bookmarks.json
vendored
6
.vscode/numbered-bookmarks.json
vendored
@ -6,13 +6,13 @@
|
|||||||
-1,
|
-1,
|
||||||
30,
|
30,
|
||||||
43,
|
43,
|
||||||
668,
|
|
||||||
-1,
|
-1,
|
||||||
-1,
|
-1,
|
||||||
-1,
|
-1,
|
||||||
607,
|
|
||||||
-1,
|
-1,
|
||||||
630
|
-1,
|
||||||
|
-1,
|
||||||
|
-1
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
10
setup.sh
10
setup.sh
@ -644,20 +644,20 @@ fi
|
|||||||
## if using PHP-TCP: add upstream handler in nginx.conf
|
## if using PHP-TCP: add upstream handler in nginx.conf
|
||||||
if [ "${phpType}" = "tcp" ]; then
|
if [ "${phpType}" = "tcp" ]; then
|
||||||
echo -e "updating ${warn}${configPath}/${file_phphandler}${norm}"
|
echo -e "updating ${warn}${configPath}/${file_phphandler}${norm}"
|
||||||
# copy .insert file into nginx.conf
|
# update .insert tags with address and port information
|
||||||
sed -i -e "/${tag_phphandler}/{r ${configPath}/${file_phpTCP}" -e 'd}' "${configPath}/${file_phphandler}"
|
|
||||||
# update tags with address and port information
|
|
||||||
sed -i "s/${tag_phpAddr}/${phpAddr}/" "${configPath}/${file_phpTCP}"
|
sed -i "s/${tag_phpAddr}/${phpAddr}/" "${configPath}/${file_phpTCP}"
|
||||||
sed -i "s/${tag_phpPort}/${phpPort}/" "${configPath}/${file_phpTCP}"
|
sed -i "s/${tag_phpPort}/${phpPort}/" "${configPath}/${file_phpTCP}"
|
||||||
|
# copy .insert file into nginx.conf
|
||||||
|
sed -i -e "/${tag_phphandler}/{r ${configPath}/${file_phpTCP}" -e 'd}' "${configPath}/${file_phphandler}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# if using PHP-SOCK: add upstream handler in nginx.conf
|
# if using PHP-SOCK: add upstream handler in nginx.conf
|
||||||
if [ "${phpType}" = "sockets" ]; then
|
if [ "${phpType}" = "sockets" ]; then
|
||||||
echo -e "updating ${warn}${configPath}/${file_phphandler}${norm}"
|
echo -e "updating ${warn}${configPath}/${file_phphandler}${norm}"
|
||||||
|
# update .insert tag with version number
|
||||||
|
sed -i "s/${tag_phpVersion}/${phpVersion}/" "${configPath}/${file_phpSOCK}"
|
||||||
# copy .insert file into nginx.conf
|
# copy .insert file into nginx.conf
|
||||||
sed -i -e "/${tag_phphandler}/{r ${configPath}/${file_phpSOCK}" -e 'd}' "${configPath}/${file_phphandler}"
|
sed -i -e "/${tag_phphandler}/{r ${configPath}/${file_phpSOCK}" -e 'd}' "${configPath}/${file_phphandler}"
|
||||||
# update tag with version number
|
|
||||||
sed -i "s/${tag_phpVersion}/${phpVersion}/" "${configPath}/${file_phpSOCK}"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# notify user file updates are completed
|
# notify user file updates are completed
|
||||||
|
Loading…
Reference in New Issue
Block a user