diff --git a/deploy-dashboard.sh b/deploy-dashboard.sh index cc32eec..a37c10b 100644 --- a/deploy-dashboard.sh +++ b/deploy-dashboard.sh @@ -100,6 +100,7 @@ if [ "$SAME_HOST" = "no" ]; then s/{app_mount_uri}/$APP_MOUNT_URI/g s/{host}/$APP_HOST/g" $HD/Deploy_Saleor/resources/saleor-dashboard/server_block > /etc/nginx/sites-available/saleor-dashboard wait + sudo chown -R www-data /var/www/$APP_HOST echo "Enabling server block and Restarting nginx..." sudo ln -s /etc/nginx/sites-available/saleor-dashboard /etc/nginx/sites-enabled/ sudo systemctl restart nginx @@ -117,9 +118,10 @@ else s|{host}|$HOST|g" /etc/nginx/sites-available/saleor wait echo "Enabling server block and Restarting nginx..." - sudo ln -s /etc/nginx/sites-available/saleor /etc/nginx/sites-enabled/ + if [ ! -f "/etc/nginx/sites-enabled/saleor" ]; then + sudo ln -s /etc/nginx/sites-available/saleor /etc/nginx/sites-enabled/ + fi sudo systemctl restart nginx fi ######################################################################################### -sudo chown -R www-data /var/www/saleor.nuzy.org \ No newline at end of file diff --git a/deploy-saleor.sh b/deploy-saleor.sh index b2b23ec..c0c782c 100644 --- a/deploy-saleor.sh +++ b/deploy-saleor.sh @@ -653,19 +653,6 @@ sudo chown -R www-data:www-data /var/www/$HOST -######################################################################################### -# Enable the Saleor service -######################################################################################### -# Enable -sudo systemctl enable saleor.service -# Reload the daemon -sudo systemctl daemon-reload -# Start the service -sudo systemctl start saleor.service -######################################################################################### - - - ######################################################################################### # Tell the user what's happening ######################################################################################### @@ -684,6 +671,19 @@ source $HD/Deploy_Saleor/deploy-dashboard.sh +######################################################################################### +# Enable the Saleor service +######################################################################################### +# Enable +sudo systemctl enable saleor.service +# Reload the daemon +sudo systemctl daemon-reload +# Start the service +sudo systemctl start saleor.service +######################################################################################### + + + ######################################################################################### # Tell the user what's happening #########################################################################################