Subversion Repositories SmartDukaan

Rev

Rev 8246 | Rev 8753 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 8246 Rev 8576
Line 21... Line 21...
21
PRICES_AND_AVAILABILITY_LOG="${LOG_DIR}/prices-and-availability.log"
21
PRICES_AND_AVAILABILITY_LOG="${LOG_DIR}/prices-and-availability.log"
22
STATIC_SERVERS="static0 static1"
22
STATIC_SERVERS="static0 static1"
23
DB_SERVER="192.168.190.114"
23
DB_SERVER="192.168.190.114"
24
TEST_SERVER="192.168.141.43"
24
TEST_SERVER="192.168.141.43"
25
STATUS=0
25
STATUS=0
-
 
26
 
-
 
27
 
-
 
28
# resolve links - $0 may be a softlink
-
 
29
PRG="$0"
-
 
30
 
-
 
31
while [ -h "$PRG" ]; do
-
 
32
  ls=`ls -ld "$PRG"`
-
 
33
  link=`expr "$ls" : '.*-> \(.*\)$'`
-
 
34
  if expr "$link" : '/.*' > /dev/null; then
-
 
35
    PRG="$link"
-
 
36
  else
-
 
37
    PRG=`dirname "$PRG"`/"$link"
-
 
38
  fi
-
 
39
done
-
 
40
# Get standard environment variables
-
 
41
PRGDIR=`dirname $(readlink -f "$PRG")`
-
 
42
STATUS_CATALOG_GENERATION=`cat $PRGDIR/status.txt`
-
 
43
 
-
 
44
if [ $STATUS_CATALOG_GENERATION -eq 1 ]; then
-
 
45
	sendEmail -f build@shop2020.in -t rajveer.singh@shop2020.in amit.gupta@shop2020.in -u "Imp: CATALOG GENERATION FAILED" -s smtp.gmail.com:587  -xu build@shop2020.in  -xp cafe@nes -o tls=yes
-
 
46
	exit 1
-
 
47
		        
-
 
48
fi 
-
 
49
 
-
 
50
 
26
for PROD_SERVER in ${PROD_SERVERS}
51
for PROD_SERVER in ${PROD_SERVERS}
27
do
52
do
28
	echo "Updating content on : ${PROD_SERVER}\n"
53
	echo "Updating content on : ${PROD_SERVER}\n"
29
	echo "Stopping apache on server"
54
	echo "Stopping apache on server"
30
	ssh ${PROD_SERVER} "/etc/init.d/apache2 stop"
55
	ssh ${PROD_SERVER} "/etc/init.d/apache2 stop"