summaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2014-04-08 15:17:32 -0300
committerSilvio Rhatto <rhatto@riseup.net>2014-04-08 15:17:32 -0300
commit3e07c2315edb40795af0cb3867e3a366da2e8488 (patch)
treeafe9ba6ead371271d75c806103f3c497b3fae748 /share
parenta53ae3757ae6edf7d4a3ff85604cc5219a97cdb5 (diff)
downloadhydra-3e07c2315edb40795af0cb3867e3a366da2e8488.tar.gz
hydra-3e07c2315edb40795af0cb3867e3a366da2e8488.tar.bz2
Deploy hydra on /usr/local/bin (3)
Diffstat (limited to 'share')
-rwxr-xr-xshare/hydra/deploy22
-rwxr-xr-xshare/hydractl/deploy22
2 files changed, 24 insertions, 20 deletions
diff --git a/share/hydra/deploy b/share/hydra/deploy
index 35b0604..dfef90f 100755
--- a/share/hydra/deploy
+++ b/share/hydra/deploy
@@ -47,19 +47,21 @@ for node in $NODES; do
if [ ! -d /usr/local/hydra ]; then
sudo git clone $ORIGIN /usr/local/hydra
( cd /usr/local/hydra ; sudo git reset --hard $COMMIT )
- sudo ln -sf /usr/local/hydra/hydra /usr/local/bin/hydra
- sudo ln -sf /usr/local/hydra/hydra /usr/local/bin/hydractl
- sudo ln -sf /usr/local/hydra/hydras /usr/local/bin/hydras
-
- # Remove from old location
- # We're keep hydra on /usr/local/bin as /usr/local/sbin might
- # not be available on $PATH when connecting to a remote system.
- sudo rm /usr/local/sbin/hydra
- sudo rm /usr/local/sbin/hydractl
- sudo rm /usr/local/sbin/hydras
else
( cd /usr/local/hydra ; sudo git pull ; sudo git reset --hard $COMMIT )
fi
##### END REMOTE SCRIPT #######
+
+ # Update symlinks
+ sudo ln -sf /usr/local/hydra/hydra /usr/local/bin/hydra
+ sudo ln -sf /usr/local/hydra/hydra /usr/local/bin/hydractl
+ sudo ln -sf /usr/local/hydra/hydras /usr/local/bin/hydras
+
+ # Remove from old location
+ # We're keep hydra on /usr/local/bin as /usr/local/sbin might
+ # not be available on $PATH when connecting to a remote system.
+ sudo rm /usr/local/sbin/hydra
+ sudo rm /usr/local/sbin/hydractl
+ sudo rm /usr/local/sbin/hydras
EOF
done
diff --git a/share/hydractl/deploy b/share/hydractl/deploy
index 969a557..5dc188a 100755
--- a/share/hydractl/deploy
+++ b/share/hydractl/deploy
@@ -42,16 +42,18 @@ fi
if [ ! -d /usr/local/hydra ]; then
$sudo git clone $ORIGIN /usr/local/hydra
( cd /usr/local/hydra ; $sudo git reset --hard $COMMIT )
- $sudo ln -sf /usr/local/hydra/hydra /usr/local/bin/hydra
- $sudo ln -sf /usr/local/hydra/hydra /usr/local/bin/hydractl
- $sudo ln -sf /usr/local/hydra/hydras /usr/local/bin/hydras
-
- # Remove from old location
- # We're keep hydra on /usr/local/bin as /usr/local/sbin might
- # not be available on $PATH when connecting to a remote system.
- $sudo rm /usr/local/sbin/hydra
- $sudo rm /usr/local/sbin/hydractl
- $sudo rm /usr/local/sbin/hydras
else
( cd /usr/local/hydra ; $sudo git pull ; $sudo git reset --hard $COMMIT )
fi
+
+# Update symlinks
+$sudo ln -sf /usr/local/hydra/hydra /usr/local/bin/hydra
+$sudo ln -sf /usr/local/hydra/hydra /usr/local/bin/hydractl
+$sudo ln -sf /usr/local/hydra/hydras /usr/local/bin/hydras
+
+# Remove from old location
+# We're keep hydra on /usr/local/bin as /usr/local/sbin might
+# not be available on $PATH when connecting to a remote system.
+$sudo rm -f /usr/local/sbin/hydra
+$sudo rm -f /usr/local/sbin/hydractl
+$sudo rm -f /usr/local/sbin/hydras