-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathmove_spring_war.sh
executable file
·74 lines (59 loc) · 1.71 KB
/
move_spring_war.sh
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/bin/bash
#READ THIS:
#You have to mount the /mnt/apollo first like this:
#sshfs [email protected]:/home/el/ -p 10522 /mnt/apollo
#Pseudocode
#1. Move target/SpringMVC.war to apollo: /var/lib/tomcat7/webapps/SpringMVC.war
#2. On apllo run: etc/init.d/tomcat7 restart
cp target/SpringMVC.war /mnt/apollo/SpringMVC.war
ssh 10.0.0.3 -p 10522 'sudo rm /var/lib/tomcat7/webapps/SpringMVC.war'
sleep 5
ssh 10.0.0.3 -p 10522 'cp /home/el/SpringMVC.war /var/lib/tomcat7/webapps/SpringMVC.war'
sleep 4
ssh 10.0.0.3 -p 10522 'sudo /etc/init.d/tomcat7 restart'
sleep 4
#rm stuff.htmle
#cp ../pr2/df3.rds .
#Kill evince if it's hanging out in the background
#ps aux | grep -ie "evince stuff.pdf" | awk '{print $2}' | xargs kill -9
#
#echo "1 remove stuff.html "
#rm stuff.html
#
#echo "2 stuff.pdf"
#rm stuff.pdf
#
#
#echo "3 run Rscript convert.r to make the stuff.html"
#Rscript convert.r
#
#
#echo "4 repair the stuff.html"
#sed -ie 's/F8F8F8/E2E2E2 !important/g' stuff.html
#
#sed -ie 's/monospace;/monospace; background-color: #fcf9ee !important/g' stuff.html
#
#echo "5 remote delete the stuff.pdf"
#rm /mnt/apollo/stuff.pdf
#rm /mnt/apollo/stuff.html
#
#rm -rf /mnt/apollo/figure
#
#echo "6 move stuff.html to apollo"
#cp stuff.html /mnt/apollo/stuff.html
#cp -r ./figure /mnt/apollo
#
#echo "7 remote run wkhtmltopdf "
##Use this for landscape
##ssh 10.0.0.3 -p 10522 '/usr/bin/xvfb-run --server-args="-screen 0, 1024x768x24" wkhtmltopdf -O landscape /home/el/stuff.html /home/el/stuff.pdf'
#
##portrait pdf
#ssh 10.0.0.3 -p 10522 '/usr/bin/xvfb-run --server-args="-screen 0, 1024x768x24" wkhtmltopdf /home/el/stuff.html /home/el/stuff.pdf'
#
#echo "8 when complete, pull the stuff.pdf file back to here"
#
#cp /mnt/apollo/stuff.pdf .
#
#
#
#