diff deploy/provision.d/030-webapp-dir.sh @ 1587:d8949733849d dockerise

Another rearrangement, to share provisioning scripts
author Chris Cannam
date Thu, 17 Aug 2017 11:55:29 +0100
parents extra/soundsoftware/scripted-deploy/vagrant/provision.d/030-webapp-dir.sh@ae8043b014c7
children 94669513c53c
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/deploy/provision.d/030-webapp-dir.sh	Thu Aug 17 11:55:29 2017 +0100
@@ -0,0 +1,16 @@
+#!/bin/bash
+
+set -e
+
+if [ ! -d /var/www/code ]; then
+    if [ ! -d /code-to-deploy ]; then
+        echo "ERROR: Expected to find code tree at /code-to-deploy: is the deployment script being invoked correctly?"
+        exit 2
+    fi
+    cp -a /code-to-deploy /var/www/code
+fi
+
+chown -R code.www-data /var/www/code
+find /var/www/code -type d -exec chmod g+s \{\} \;
+
+