summaryrefslogtreecommitdiff
path: root/roles/sublab_web/templates/website-rebuild.sh.j2
diff options
context:
space:
mode:
Diffstat (limited to 'roles/sublab_web/templates/website-rebuild.sh.j2')
-rw-r--r--roles/sublab_web/templates/website-rebuild.sh.j24
1 files changed, 4 insertions, 0 deletions
diff --git a/roles/sublab_web/templates/website-rebuild.sh.j2 b/roles/sublab_web/templates/website-rebuild.sh.j2
index ac29e3d..5cd3964 100644
--- a/roles/sublab_web/templates/website-rebuild.sh.j2
+++ b/roles/sublab_web/templates/website-rebuild.sh.j2
@@ -3,6 +3,10 @@
# {{ ansible_managed }}
#
+if [ "$USER" != "sublab_web" ]; then
+ exec sudo -u sublab_web /var/www/{{sublab_web_server_name}}/website-rebuild.sh
+fi
+
cd /var/www/{{sublab_web_server_name}}/htdocs
if [ x"$1" != x"-l" ]; then