-
Notifications
You must be signed in to change notification settings - Fork 0
/
cpanstats-web1.sh
63 lines (48 loc) · 1.84 KB
/
cpanstats-web1.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
#!/usr/bin/bash
WEB=/var/www
BASE=/opt/projects/cpantesters
LOG=$BASE/cron/cpanstats-web1.log
date_format="%Y/%m/%d %H:%M:%S"
echo `date +"$date_format"` "START" >>$LOG
cd $BASE/cpandevel
mkdir -p logs
echo `date +"$date_format"` "Creating Devel site" >>$LOG
perl bin/cpandevel-writepages -c=data/settings.ini >>$LOG 2>&1
echo `date +"$date_format"` "Created Devel site" >>$LOG
cd $WEB/cpanadmin/toolkit
echo `date +"$date_format"` "Updating Testers DB" >>$LOG
perl build-testers-db.pl --config=data/build-testers-db.ini --verbose --max --build >>$LOG 2>&1
echo `date +"$date_format"` "Updated Testers DB" >>$LOG
perl maintain-leaderboard.pl --config=data/build-testers-db.ini --verbose >>$LOG 2>&1
echo `date +"$date_format"` "Updated Leaderboard" >>$LOG
cd $BASE/cpanstats
mkdir -p logs
mkdir -p data
perl bin/getmailrc.pl
echo `date +"$date_format"` "Creating cpanstats basic pages" >>$LOG
perl bin/cpanstats-writepages \
--config=data/settings.ini \
--basics --update --stats >>$LOG 2>&1
# --logclean=1 \
echo `date +"$date_format"` "Updating leaderboard table" >>$LOG
perl bin/cpanstats-leaderboard \
--config=data/settings.ini \
--logclean=0 \
--update >>$LOG 2>&1
echo `date +"$date_format"` "Creating cpanstats site" >>$LOG
perl bin/cpanstats-writepages \
--config=data/settings.ini \
--logclean=0 \
--leader >>$LOG 2>&1
# --logfile=$LOG \
# --logclean=1 \
echo `date +"$date_format"` "Creating cpanstats graphs" >>$LOG
perl bin/cpanstats-writegraphs \
--logclean=0 \
--config=data/settings.ini >>$LOG 2>&1
#cd $BASE/cpanstats-excel
#mkdir -p logs
#
#echo `date +"$date_format"` "Creating cpanstats excel files" >>$LOG
#perl bin/cpanstats-writeexcel >>$LOG 2>&1
echo `date +"$date_format"` "STOP" >>$LOG