updated subst php sockets to use alternate delim in sed statement

This commit is contained in:
Asif Bacchus 2019-01-08 01:10:18 -07:00
parent d7bb02c9f0
commit 95eaf051f4
2 changed files with 9 additions and 8 deletions

View File

@ -6,13 +6,13 @@
-1,
19,
54,
746,
748,
68,
-1,
-1,
-1,
-1,
-1,
733
637,
738
]
}
]

View File

@ -633,8 +633,9 @@ if [ "${phpType}" = "sockets" ]; then
if [ -z "${phpSock}" ]; then
echo -e "\n${err}Could not auto-detect socket file name${norm}"
echo -e "PHP handler will be set up but you will have to edit ${warn}nginx.conf${norm}"
echo -e "manually to include the proper socket-file name where you see ${warn}<phpSock>${norm}\n"
phpSock='<phpSock>'
echo "manually to include the proper socket-file name where you see"
echo -e "${warn}<phpSocketFilename>${norm}"
phpSock='<phpSocketFilename>'
fi
fi
@ -734,8 +735,8 @@ fi
# if using PHP-SOCK: add upstream handler in nginx.conf
if [ "${phpType}" = "sockets" ]; then
echo -e "updating ${warn}${configPath}/${file_phphandler}${norm}"
# update .insert tag with version number
sed -i "s/${tag_phpSock}/${phpSock}/" "${configPath}/${file_phpSock}"
# update .insert file with socket filename or placeholder tag
sed -i "s%${tag_phpSock}%${phpSock}%" "${configPath}/${file_phpSock}"
# copy .insert file into nginx.conf
sed -i -e "/${tag_phphandler}/{r ${configPath}/${file_phpSock}" -e 'd}' "${configPath}/${file_phphandler}"
fi