sbin/sync/fabfile.py
changeset 642 b419e891b0bd
parent 641 7d5640606813
child 668 b52724db32ab
--- a/sbin/sync/fabfile.py	Fri May 25 16:33:16 2012 +0200
+++ b/sbin/sync/fabfile.py	Fri May 25 16:40:12 2012 +0200
@@ -118,7 +118,7 @@
     print("Create virtualenv export_path : %s - remote venvpath : %s" % (remote_venv_export_path, remotevirtualenvpath))
     activate_path = os.path.join(remotevirtualenvpath, "bin/activate")
     if "remote_baseline_venv" in env and env.remote_baseline_venv:
-        prefix_str = os.path.join(env.remote_baseline_venv, "bin/activate")
+        prefix_str = "source \"%s\"" % os.path.join(env.remote_baseline_venv, "bin/activate")
     else:
         prefix_str = "echo"
     run("mkdir -p \"%s\"" % remotevirtualenvpath)
@@ -150,7 +150,7 @@
 def relaunch_server():
     print("Relaunch server")
     collectstatic(env.remote_web_path, env.remote_virtualenv_path)
-    sudo(env.web_relaunch_cmd)
+    sudo(env.web_relaunch_cmd, shell=False)
 
 @task
 def sync_web(version):