| Line 55... |
Line 55... |
| 55 |
|
55 |
|
| 56 |
echo "Rsyncing generated content to staging and production servers"
|
56 |
echo "Rsyncing generated content to staging and production servers"
|
| 57 |
echo "======================================================="
|
57 |
echo "======================================================="
|
| 58 |
#Update media content on both staging and production
|
58 |
#Update media content on both staging and production
|
| 59 |
cd /var/lib/tomcat6/webapps/export
|
59 |
cd /var/lib/tomcat6/webapps/export
|
| 60 |
rsync -az --delete media ${STAGING_SERVER}:/var/lib/tomcat6/webapps/export
|
60 |
rsync -az --delete media/ ${STAGING_SERVER}:/var/lib/tomcat6/webapps/export/media-offline
|
| - |
|
61 |
cd /var/lib/tomcat6/webapps/export/media
|
| 61 |
for PROD_SERVER in ${PROD_SERVERS}
|
62 |
for PROD_SERVER in ${PROD_SERVERS}
|
| 62 |
do
|
63 |
do
|
| 63 |
rsync -az --delete media ${PROD_SERVER}:/var/lib/tomcat6/webapps/export
|
64 |
rsync -az --delete website ${PROD_SERVER}:/var/lib/tomcat6/webapps/export/media-offline
|
| 64 |
done
|
65 |
done
|
| 65 |
rsync -az --delete media ${STATIC_SERVER}:/var/www
|
66 |
rsync -az --delete static ${STATIC_SERVER}:/var/www/media-offline
|
| 66 |
|
67 |
|
| 67 |
rm -f javascripts.tgz
|
68 |
rm -f javascripts.tgz
|
| 68 |
mv javascripts javascripts-${DATE}; tar -zcf javascripts.tgz javascripts-${DATE}; mv javascripts-${DATE} javascripts
|
69 |
mv javascripts javascripts-${DATE}; tar -zcf javascripts.tgz javascripts-${DATE}; mv javascripts-${DATE} javascripts
|
| 69 |
scp javascripts.tgz ${STAGING_SERVER}:/var/lib/tomcat6/webapps/export/
|
70 |
scp javascripts.tgz ${STAGING_SERVER}:/var/lib/tomcat6/webapps/export/
|
| 70 |
for PROD_SERVER in ${PROD_SERVERS}
|
71 |
for PROD_SERVER in ${PROD_SERVERS}
|
| 71 |
do
|
72 |
do
|
| 72 |
scp javascripts.tgz ${PROD_SERVER}:/var/lib/tomcat6/webapps/export/
|
73 |
scp javascripts.tgz ${PROD_SERVER}:/var/lib/tomcat6/webapps/export/
|
| 73 |
done
|
74 |
done
|
| 74 |
scp javascripts.tgz ${STATIC_SERVER}:/var/www/
|
75 |
scp javascripts.tgz ${STATIC_SERVER}:/var/www/
|
| 75 |
|
76 |
|
| 76 |
rsync -az --delete documents ${STAGING_SERVER}:/var/lib/tomcat6/webapps/export
|
77 |
rsync -az --delete documents/ ${STAGING_SERVER}:/var/lib/tomcat6/webapps/export/documents-offline
|
| 77 |
for PROD_SERVER in ${PROD_SERVERS}
|
- |
|
| 78 |
do
|
- |
|
| 79 |
rsync -az --delete documents ${PROD_SERVER}:/var/lib/tomcat6/webapps/export
|
- |
|
| 80 |
done
|
- |
|
| 81 |
rsync -az --delete documents ${STATIC_SERVER}:/var/www
|
78 |
rsync -az --delete documents/ ${STATIC_SERVER}:/var/www/documents-offline
|
| 82 |
|
79 |
|
| 83 |
#Update entities on staging using the entities-shop2020 direcotry
|
80 |
#Update entities on staging using the entities-shop2020 direcotry
|
| 84 |
#Update entities on production using the entities-saholic directory
|
81 |
#Update entities on production using the entities-saholic directory
|
| 85 |
cd /var/lib/tomcat6/webapps/export/html
|
82 |
cd /var/lib/tomcat6/webapps/export/html
|
| 86 |
rm -f ${STAGING_ENTITIES_EXPORT_PATH}.tgz ${PROD_ENTITIES_EXPORT_PATH}.tgz
|
83 |
rm -f ${STAGING_ENTITIES_EXPORT_PATH}.tgz ${PROD_ENTITIES_EXPORT_PATH}.tgz
|