From 3c37aa091e4d28d96d7987d7ddca127fd957d419 Mon Sep 17 00:00:00 2001 From: Daniel Farrell Date: Mon, 4 Apr 2016 15:17:26 -0400 Subject: [PATCH] Fix cluster-deployer script execution in venv The hard-coded path to the python executable in deploy.py and restart.py broke when executing them like scripts in virtual environments. ``` $ ./deploy.py zsh: ./deploy.py: bad interpreter: /usr/local/bin/python: no such file or directory ``` Moves to standard `/usr/bin/env python` method. Removes extra comment character from just before restart.py shebang. Marks restart.py as executable, since it's designed to be run like a script. Change-Id: I945e5704327fb8a2c6387a919054560bd23055d1 Signed-off-by: Daniel Farrell --- tools/clustering/cluster-deployer/deploy.py | 2 +- tools/clustering/cluster-deployer/restart.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) mode change 100644 => 100755 tools/clustering/cluster-deployer/restart.py diff --git a/tools/clustering/cluster-deployer/deploy.py b/tools/clustering/cluster-deployer/deploy.py index 6de9feabe0..877d7d946b 100755 --- a/tools/clustering/cluster-deployer/deploy.py +++ b/tools/clustering/cluster-deployer/deploy.py @@ -1,4 +1,4 @@ -#!/usr/local/bin/python +#!/usr/bin/env python # # This script deploys a cluster # ------------------------------------------- diff --git a/tools/clustering/cluster-deployer/restart.py b/tools/clustering/cluster-deployer/restart.py old mode 100644 new mode 100755 index d02a76df25..c56092ac34 --- a/tools/clustering/cluster-deployer/restart.py +++ b/tools/clustering/cluster-deployer/restart.py @@ -1,4 +1,4 @@ -# #!/usr/local/bin/python +#!/usr/bin/env python # # This script restarts the cluster nodes. It can optionally cleanup the persistent data. # -------------------------------------------------------------------------------------- -- 2.36.6