Skip to content
This repository was archived by the owner on Jan 25, 2022. It is now read-only.
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 12 additions & 6 deletions guest/cli/includes/set-web-processvm
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ echo
echo "Setting Web Process VM to $1..."
echo


function editfile {
sudo sed -i "s/$1/$2/" "$3"
}
Expand All @@ -17,10 +16,17 @@ function delfile {

conf_file="/etc/nginx/sites-available/default"

editfile "php5.6" "$1" "$conf_file"
delfile "$conf_file"
if [ -f "/var/run/php/$1.sock" ] || [ -f "/var/run/php/$1-fpm.sock" ]; then
editfile "php5.6" "$1" "$conf_file"
delfile "$conf_file"

editfile "php7.0" "$1" "$conf_file"
delfile "$conf_file"

editfile "php7.0" "$1" "$conf_file"
delfile "$conf_file"
sudo service nginx reload

sudo service nginx reload
return 0
else
echo_if_not_quiet "$*" "=The $1 process is not currently running on this machine!"
return 1
fi