summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xshare/hydra/install32
-rwxr-xr-xshare/hydractl/install34
2 files changed, 19 insertions, 47 deletions
diff --git a/share/hydra/install b/share/hydra/install
index 46fbb72..def34ed 100755
--- a/share/hydra/install
+++ b/share/hydra/install
@@ -45,34 +45,6 @@ for node in $NODES; do
# Rsync version
rsync -rltDv --no-perms --delete --rsync-path "sudo rsync" $APP_BASE/ $node:/usr/local/share/hydra/
- $HYDRA_CONNECT $node <<EOF
- ##### BEGIN REMOTE SCRIPT #####
- if ! which git &> /dev/null; then
- echo "Installing git..."
- sudo apt-get update
- sudo apt-get install git-core -y
- fi
-
- # Git version
- #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/share/hydra ; sudo git pull ; sudo git reset --hard $COMMIT )
- #fi
-
- # Update symlinks
- 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 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 -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
+ # Proceed installation remotely
+ $HYDRA_CONNECT $node /usr/local/share/hydra/hydractl install
done
diff --git a/share/hydractl/install b/share/hydractl/install
index 00298e3..4e05848 100755
--- a/share/hydractl/install
+++ b/share/hydractl/install
@@ -20,26 +20,23 @@
source $APP_BASE/lib/hydra/functions || exit 1
hydra_config_load
-# Validation
-if [ -z "$ORIGIN" ]; then
- ORIGIN="git://git.fluxo.info/hydra.git"
-fi
-
# Set sudo config
if [ "`whoami`" != 'root' ]; then
sudo="sudo"
fi
-# Deploy
-echo "Installing to local node..."
-
-if ! which git &> /dev/null; then
- echo "Installing git..."
- $sudo apt-get update
- $sudo apt-get install git-core -y
-fi
-
-# Git version
+# Deploy, git version
+#
+#if ! which git &> /dev/null; then
+# echo "Installing git..."
+# $sudo apt-get update
+# $sudo apt-get install git -y
+#fi
+#
+#if [ -z "$ORIGIN" ]; then
+# ORIGIN="git://git.fluxo.info/hydra.git"
+#fi
+#
#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 )
@@ -47,8 +44,11 @@ fi
# ( cd /usr/local/share/hydra ; $sudo git pull ; $sudo git reset --hard $COMMIT )
#fi
-# Rsync version
-$sudo rsync -av --delete $APP_BASE/ /usr/local/share/hydra/
+# Deploy, rsync version
+if [ "$APP_BASE" != "/usr/local/share/hydra" ]; then
+ echo "Installing into /usr/local/share/hydra..."
+ $sudo rsync -av --delete $APP_BASE/ /usr/local/share/hydra/
+fi
# Update symlinks
$sudo ln -sf /usr/local/share/hydra/hydra /usr/local/bin/hydra