File tree 2 files changed +39
-2
lines changed 2 files changed +39
-2
lines changed Original file line number Diff line number Diff line change
1
+ #! /bin/bash
2
+
3
+ pidfile=/var/run/nodejs/sync-benchmarking.pid
4
+ cmd="
5
+ rsync -aqz --delete benchmark:charts/ /home/www/benchmarking/charts/ &&
6
+ rsync -aqz --delete benchmark:coverage-out/out/ /home/www/coverage/
7
+ "
8
+
9
+ if [ -a " $pidfile " -a -r " $pidfile " ]; then
10
+ read pid < " $pidfile "
11
+ if [ -n " ${pid:- } " ]; then
12
+ if $( kill -0 " ${pid:- } " 2> /dev/null) ; then
13
+ exit 0 # already running
14
+ # else stale pid
15
+ fi
16
+ fi
17
+ fi
18
+
19
+ echo $$ > $pidfile
20
+ bash -c " $cmd "
21
+ rm $pidfile
Original file line number Diff line number Diff line change 70
70
group : root
71
71
tags : setup
72
72
73
+ - name : Site Setup | Copy sync-benchmarking.sh script
74
+ copy :
75
+ src : ./resources/scripts/sync-benchmarking.sh
76
+ dest : /home/nodejs/sync-benchmarking.sh
77
+ mode : 0755
78
+ owner : root
79
+ group : root
80
+ tags : setup
81
+
73
82
- name : Site Setup | Make /home/nodejs/.npm
74
83
file :
75
84
path : /home/nodejs/.npm
78
87
owner : nodejs
79
88
tags : setup
80
89
90
+ - name : Site Setup | Make /var/run/nodejs
91
+ file :
92
+ path : /var/run/nodejs
93
+ state : directory
94
+ mode : 0755
95
+ owner : nodejs
96
+ tags : setup
97
+
81
98
- name : Site Setup | Initial nodejs, iojs and benchmarking clone and update
82
99
become : yes
83
100
become_user : " nodejs"
98
115
- ' * * * * * nodejs /home/nodejs/check-build-site.sh nodejs'
99
116
- ' * * * * * nodejs /home/nodejs/check-build-site.sh iojs'
100
117
- ' * * * * * root /home/nodejs/cdn-purge.sh'
101
- - ' * */4 * * * nodejs rsync -aqz --delete benchmark:charts/ /home/www/benchmarking/charts/'
102
- - ' * */4 * * * nodejs rsync -aqz --delete benchmark:coverage-out/out/ /home/www/coverage/'
118
+ - ' * */4 * * * nodejs /home/nodejs/sync-benchmarking.sh'
103
119
tags : setup
You can’t perform that action at this time.
0 commit comments