^
This commit is contained in:
parent
5c63427f8a
commit
6a176df4a9
1 changed files with 26 additions and 16 deletions
|
@ -361,9 +361,6 @@ echo ""
|
||||||
# Replace any parameter slugs in the template files with real paramaters & write them to
|
# Replace any parameter slugs in the template files with real paramaters & write them to
|
||||||
# the production files
|
# the production files
|
||||||
#########################################################################################
|
#########################################################################################
|
||||||
# Create vassals directory in virtual environment
|
|
||||||
mkdir $HD/env/saleor/vassals
|
|
||||||
sudo ln -s $HD/saleor/saleor/wsgi/uwsgi.ini $HD/env/saleor/vassals
|
|
||||||
# Does an old saleor.service file exist?
|
# Does an old saleor.service file exist?
|
||||||
if [ -f "/etc/systemd/system/saleor.service" ]; then
|
if [ -f "/etc/systemd/system/saleor.service" ]; then
|
||||||
# Remove the old service file
|
# Remove the old service file
|
||||||
|
@ -470,14 +467,27 @@ cd $HD/saleor
|
||||||
if [ "vOPT" = "true" ]; then
|
if [ "vOPT" = "true" ]; then
|
||||||
# Checkout the specified version
|
# Checkout the specified version
|
||||||
git checkout $VERSION
|
git checkout $VERSION
|
||||||
|
wait
|
||||||
|
fi
|
||||||
|
# Create vassals directory in virtual environment
|
||||||
|
if [ ! -d "$HD/env" ]; then
|
||||||
|
mkdir $HD/env
|
||||||
|
wait
|
||||||
fi
|
fi
|
||||||
# Does an old virtual environment for Saleor exist?
|
# Does an old virtual environment for Saleor exist?
|
||||||
if [ -f "$HD/env/saleor" ]; then
|
if [ ! -d "$HD/env/saleor" ]; then
|
||||||
# remove the old virtual environment
|
|
||||||
sudo rm -R $HD/env/saleor
|
|
||||||
fi
|
|
||||||
# Create a new virtual environment for Saleor
|
# Create a new virtual environment for Saleor
|
||||||
python3 -m venv $HD/env/saleor
|
python3 -m venv $HD/env/saleor
|
||||||
|
wait
|
||||||
|
fi
|
||||||
|
# Create vassals directory in virtual environment
|
||||||
|
if [ ! -d "$HD/env/saleor/vassals" ]; then
|
||||||
|
mkdir $HD/env/saleor/vassals
|
||||||
|
wait
|
||||||
|
sudo ln -s $HD/saleor/saleor/wsgi/uwsgi.ini $HD/env/saleor/vassals
|
||||||
|
wait
|
||||||
|
fi
|
||||||
|
wait
|
||||||
# Activate the virtual environment
|
# Activate the virtual environment
|
||||||
source $HD/env/saleor/bin/activate
|
source $HD/env/saleor/bin/activate
|
||||||
# Make sure pip is upgraded
|
# Make sure pip is upgraded
|
||||||
|
@ -510,14 +520,6 @@ deactivate
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#########################################################################################
|
|
||||||
echo "Enabling server block and Restarting nginx..."
|
|
||||||
sudo ln -s /etc/nginx/sites-available/saleor /etc/nginx/sites-enabled/
|
|
||||||
sudo systemctl restart nginx
|
|
||||||
#########################################################################################
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#########################################################################################
|
#########################################################################################
|
||||||
# Create the Saleor service
|
# Create the Saleor service
|
||||||
#########################################################################################
|
#########################################################################################
|
||||||
|
@ -531,6 +533,14 @@ sudo update-rc.d saleor defaults
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#########################################################################################
|
||||||
|
echo "Enabling server block and Restarting nginx..."
|
||||||
|
sudo ln -s /etc/nginx/sites-available/saleor /etc/nginx/sites-enabled/
|
||||||
|
sudo systemctl restart nginx
|
||||||
|
#########################################################################################
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#########################################################################################
|
#########################################################################################
|
||||||
# Tell the user what's happening
|
# Tell the user what's happening
|
||||||
#########################################################################################
|
#########################################################################################
|
||||||
|
|
Loading…
Reference in a new issue