Archived
1
0
Fork 0

New script to manage servers

This commit is contained in:
Mercier Pierre-Olivier 2013-09-15 15:27:05 +02:00
parent 0001a46686
commit 7b2a4185c9
3 changed files with 75 additions and 35 deletions

26
commands/manage-server.sh Normal file
View file

@ -0,0 +1,26 @@
#! /bin/sh
cd $(dirname "$0")
SRV_LIST="moore noyce hamano cpp"
ACTIONS="start stop restart"
for ACT in $ACTIONS
do
if [ -n "$1" ] && [ "$1" == "$ACT" ]
then
ACTION="$ACT"
break
fi
done
if [ -z "$ACTION" ]
then
echo "Usage: $0 [$ACTIONS]"
fi
for SRV in $SRV_LIST
do
ssh root@$SRV ~/liblerdorf/process/launch.sh "$ACTION"
done