summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2016-06-16 16:09:56 -0300
committerSilvio Rhatto <rhatto@riseup.net>2016-06-16 16:09:56 -0300
commitc4f04a396dea31b84cf641b8e3c66184fd3f3531 (patch)
treeda9617948571acb221524ec8928a03085ca306f6
parent2796dfabc22e9e8fa5410b7fabead24f93f81054 (diff)
downloadhydra-c4f04a396dea31b84cf641b8e3c66184fd3f3531.tar.gz
hydra-c4f04a396dea31b84cf641b8e3c66184fd3f3531.tar.bz2
Install: move to /usr/local/share/hydra
-rw-r--r--doc/todo.rst1
-rwxr-xr-xshare/hydra/install25
-rwxr-xr-xshare/hydractl/install25
3 files changed, 26 insertions, 25 deletions
diff --git a/doc/todo.rst b/doc/todo.rst
index e88294f..f0453b3 100644
--- a/doc/todo.rst
+++ b/doc/todo.rst
@@ -2,7 +2,6 @@ TODO
====
- proper documentation.
-- install: move to /usr/local/share/hydra.
- ssh-config: hydra integration using a proxy command.
- init: version control in the superproject?
- metrics and alarms subsystem.
diff --git a/share/hydra/install b/share/hydra/install
index 00154b7..46fbb72 100755
--- a/share/hydra/install
+++ b/share/hydra/install
@@ -43,7 +43,7 @@ for node in $NODES; do
echo "Installing to $node..."
# Rsync version
- rsync -rltDv --no-perms --delete --rsync-path "sudo rsync" $APP_BASE/ $node:/usr/local/hydra/
+ rsync -rltDv --no-perms --delete --rsync-path "sudo rsync" $APP_BASE/ $node:/usr/local/share/hydra/
$HYDRA_CONNECT $node <<EOF
##### BEGIN REMOTE SCRIPT #####
@@ -54,24 +54,25 @@ for node in $NODES; do
fi
# Git version
- #if [ ! -d /usr/local/hydra ]; then
- # sudo git clone $ORIGIN /usr/local/hydra
- # ( cd /usr/local/hydra ; sudo git reset --hard $COMMIT )
+ #if [ ! -d /usr/local/share/hydra ]; then
+ # sudo git clone $ORIGIN /usr/local/share/hydra
+ # ( cd /usr/local/share/hydra ; sudo git reset --hard $COMMIT )
#else
- # ( cd /usr/local/hydra ; sudo git pull ; sudo git reset --hard $COMMIT )
+ # ( cd /usr/local/share/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
+ sudo ln -sf /usr/local/share/hydra/hydra /usr/local/bin/hydra
+ sudo ln -sf /usr/local/share/hydra/hydra /usr/local/bin/hydractl
+ sudo ln -sf /usr/local/share/hydra/hydras /usr/local/bin/hydras
- # Remove from old location
+ # Remove from old locations
# We 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
+ sudo rm -fr /usr/local/hydra
+ sudo rm -f /usr/local/sbin/hydra
+ sudo rm -f /usr/local/sbin/hydractl
+ sudo rm -f /usr/local/sbin/hydras
##### END REMOTE SCRIPT #######
EOF
done
diff --git a/share/hydractl/install b/share/hydractl/install
index baae176..00298e3 100755
--- a/share/hydractl/install
+++ b/share/hydractl/install
@@ -40,24 +40,25 @@ if ! which git &> /dev/null; then
fi
# Git version
-#if [ ! -d /usr/local/hydra ]; then
-# $sudo git clone $ORIGIN /usr/local/hydra
-# ( cd /usr/local/hydra ; $sudo git reset --hard $COMMIT )
+#if [ ! -d /usr/local/share/hydra ]; then
+# $sudo git clone $ORIGIN /usr/local/share/hydra
+# ( cd /usr/local/share/hydra ; $sudo git reset --hard $COMMIT )
#else
-# ( cd /usr/local/hydra ; $sudo git pull ; $sudo git reset --hard $COMMIT )
+# ( cd /usr/local/share/hydra ; $sudo git pull ; $sudo git reset --hard $COMMIT )
#fi
# Rsync version
-$sudo rsync -av --delete $APP_BASE/ /usr/local/hydra/
+$sudo rsync -av --delete $APP_BASE/ /usr/local/share/hydra/
# 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
+$sudo ln -sf /usr/local/share/hydra/hydra /usr/local/bin/hydra
+$sudo ln -sf /usr/local/share/hydra/hydra /usr/local/bin/hydractl
+$sudo ln -sf /usr/local/share/hydra/hydras /usr/local/bin/hydras
-# Remove from old location
+# Remove from old locations
# 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
+$sudo rm -fr /usr/local/hydra
+$sudo rm -f /usr/local/sbin/hydra
+$sudo rm -f /usr/local/sbin/hydractl
+$sudo rm -f /usr/local/sbin/hydras