Minimalistisches Beispiel-Modul mit generierten Modulscripten für Kettle-Jobs http://www.superx-projekt.de/doku/kurse/kettle_monitoring/
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

28 lines
766 B

#!/bin/bash
#Synchronisierung webapp zum Zielserver
#Benutzer Variablen:
#REMOTE_HOST ->Ziel-Hostname
#REMOTE_USER ->Ziel-Benutzerkennung
#REMOTE_DIR -> Zielpfad
if [ "$LOCAL_DIR" = "" ]
then
LOCAL_DIR=`pwd`
fi
if [ "$REMOTE_DIR" = "" ]
then
REMOTE_DIR=$SUPERX_DIR
fi
echo "Sync von $LOCAL_DIR nach $REMOTE_DIR"
if [ "$REMOTE_HOST" = "" ]
then
rsync -L -rauvz $LOCAL_DIR/superx/WEB-INF/conf/edustore/db/* $REMOTE_DIR/db
rsync -L -rauvz $LOCAL_DIR/superx/* $REMOTE_DIR/webserver/tomcat/webapps/superx
else
rsync -L -rauvz -e ssh $LOCAL_DIR/superx/WEB-INF/conf/edustore/db/* "$REMOTE_USER"@"$REMOTE_HOST":$REMOTE_DIR/db
rsync -L -rauvz -e ssh $LOCAL_DIR/superx/* "$REMOTE_USER"@"$REMOTE_HOST":$REMOTE_DIR/webserver/tomcat/webapps/superx
fi