From fe9cc480a122b3f76a2b980ff1d9bbe9b2d6107a Mon Sep 17 00:00:00 2001 From: Mercier Pierre-Olivier Date: Tue, 5 Nov 2013 17:40:52 +0100 Subject: [PATCH] Add install procedure into manage-server --- commands/manage-server.sh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/commands/manage-server.sh b/commands/manage-server.sh index e1ea557..9bb03f2 100755 --- a/commands/manage-server.sh +++ b/commands/manage-server.sh @@ -6,7 +6,7 @@ WKS_LIST="apl" SRV_LIST="moore noyce hamano cpp otto" SCP_LIST="ksh knuth" -KNOWN_ACTIONS="start stop restart update log viewlog view_log" +KNOWN_ACTIONS="start stop restart install update log viewlog view_log" LOG=`mktemp` @@ -80,7 +80,7 @@ do for DEST in $DESTS do echo -e "\e[1;34m>>>\e[0m \e[33m$ACTION\e[0m on \e[1m$DEST\e[0m" - if [ "$ACTION" == "update" ] + if [ "$ACTION" == "install" ] || [ "$ACTION" == "update" ] then SCP=0 for D in $SCP_LIST @@ -94,6 +94,11 @@ do if [ $SCP -eq 0 ] then + if [ "$ACTION" == "install" ] && + ! ssh root@$DEST "mkdir -p /home/intradmin/ && git clone '$(echo `git remote -v` | cut -d " " -f 2)' /home/intradmin/liblerdorf && ln -s /home/intradmin/liblerdorf ~/liblerdorf" + then + exit 1 + fi ssh root@$DEST "make -C liblerdorf update upgrade" else cd ..