Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/api-server.sh
blob: cb7fc2d3a0a3ffb0e619c5a8e7808be101e7aeb5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!/bin/bash
#api-slave.sh

SERVERDIR="."

SLAVEACCT="apislave"
SLAVENAME="sugarlabs1.xen.prgmr.com"
SLAVEDIR="apidocs"

# bash check if directory exists
if [ ! -d $SERVERDIR ]; then
       mkdir $SERVERDIR 
fi

ssh $SLAVEACCT@$SLAVENAME './api-slave.sh #> api-slave.log'


rsync   --archive \
        --verbose \
        --compress \
        --rsh=ssh \
        $SLAVEACCT@$SLAVENAME:$SLAVEDIR $SERVERDIR


# script to send simple email
# email subject
#SUBJECT="SET-EMAIL-SUBJECT"
# Email To ?
#EMAIL="dfarning@sugarlabs.org"
# Email text/message
#EMAILMESSAGE="/tmp/emailmessage.txt"
#echo "This is an email message test"> $EMAILMESSAGE
#echo "This is email text" >>$EMAILMESSAGE
# send an email using /bin/mail
#mail -s "$SUBJECT" "$EMAIL" < $EMAILMESSAGE