From 95eaf051f4f0fdb5cc5a0a382a9ca734d04f3c43 Mon Sep 17 00:00:00 2001 From: Asif Bacchus Date: Tue, 8 Jan 2019 01:10:18 -0700 Subject: [PATCH] updated subst php sockets to use alternate delim in sed statement --- .vscode/numbered-bookmarks.json | 8 ++++---- setup.sh | 9 +++++---- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.vscode/numbered-bookmarks.json b/.vscode/numbered-bookmarks.json index c889a30..dcdf4d1 100644 --- a/.vscode/numbered-bookmarks.json +++ b/.vscode/numbered-bookmarks.json @@ -6,13 +6,13 @@ -1, 19, 54, - 746, + 748, + 68, -1, -1, -1, - -1, - -1, - 733 + 637, + 738 ] } ] diff --git a/setup.sh b/setup.sh index 09ef831..921555a 100755 --- a/setup.sh +++ b/setup.sh @@ -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}${norm}\n" - phpSock='' + echo "manually to include the proper socket-file name where you see" + echo -e "${warn}${norm}" + phpSock='' 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