Subversion Repositories ALCASAR

Rev

Rev 2138 | Rev 2141 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log

Rev 2138 Rev 2139
Line 174... Line 174...
174
			echo "<td>$RPM_DATE</td>" >> $HTML_REPORT
174
			echo "<td>$RPM_DATE</td>" >> $HTML_REPORT
175
			echo "<td>$RPM_VERSION</td>" >> $HTML_REPORT
175
			echo "<td>$RPM_VERSION</td>" >> $HTML_REPORT
176
			echo "</tr>" >> $HTML_REPORT
176
			echo "</tr>" >> $HTML_REPORT
177
		done
177
		done
178
	else
178
	else
179
		echo "<tr collspan="3"><td>Pas de RPM mis à jour cette semaine</td></tr>" >> $HTML_REPORT
179
		echo "<tr><td colspan=3>Pas de RPM mis à jour cette semaine</td></tr>" >> $HTML_REPORT
180
	fi
180
	fi
181
else
181
else
182
	echo $LINE_HTML >> $HTML_REPORT
182
	echo $LINE_HTML >> $HTML_REPORT
183
fi
183
fi
184
done
184
done
Line 655... Line 655...
655
echo "};</script>" >> $HTML_REPORT
655
echo "};</script>" >> $HTML_REPORT
656
echo "</body>" >> $HTML_REPORT
656
echo "</body>" >> $HTML_REPORT
657
echo "</html>" >> $HTML_REPORT
657
echo "</html>" >> $HTML_REPORT
658
 
658
 
659
#convert html document to PDF
659
#convert html document to PDF
660
cp $HTML_REPORT $DIR_BUILD/rapport.html
-
 
661
/usr/bin/wkhtmltopdf $HTML_REPORT $(echo $HTML_REPORT | cut -d'.' -f1).pdf
660
/usr/bin/wkhtmltopdf $HTML_REPORT $(echo $HTML_REPORT | cut -d'.' -f1).pdf
662
chown apache:apache $(echo $HTML_REPORT | cut -d'.' -f1).pdf
661
chown apache:apache $(echo $HTML_REPORT | cut -d'.' -f1).pdf
663
chmod 644 $(echo $HTML_REPORT | cut -d'.' -f1).pdf
662
chmod 644 $(echo $HTML_REPORT | cut -d'.' -f1).pdf
-
 
663
mv $HTML_REPORT /var/Save/activity_report/
664
mv $(echo $HTML_REPORT | cut -d'.' -f1).pdf /var/Save/
664
mv $(echo $HTML_REPORT | cut -d'.' -f1).pdf /var/Save/activity_report/
665
 
665
 
666
#compress every logs, if they exist
666
#compress every logs, if they exist
667
if [ $(ls -1 /var/log/havp/access.log.* 2>/dev/null | wc -l) -ge 1 ]
667
if [ $(ls -1 /var/log/havp/access.log.* 2>/dev/null | wc -l) -ge 1 ]
668
then
668
then
669
	gzip /var/log/havp/access.log.*
669
	gzip /var/log/havp/access.log.*
Line 679... Line 679...
679
rm $TMP_BL
679
rm $TMP_BL
680
rm $TMP_BL_WEEK
680
rm $TMP_BL_WEEK
681
rm $TMP_BL_WEEK_CAT
681
rm $TMP_BL_WEEK_CAT
682
rm $TMP_STATS
682
rm $TMP_STATS
683
rm $TMP_STATS_2
683
rm $TMP_STATS_2
684
rm $HTML_REPORT
-