Subversion Repositories ALCASAR

Rev

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

Rev 2521 Rev 2644
Line 1... Line 1...
1
#!/bin/bash
1
#!/bin/bash
2
# $Id: alcasar-activity_report.sh 2521 2018-04-02 19:46:16Z armand.ito $
2
# $Id: alcasar-activity_report.sh 2644 2018-10-29 14:09:33Z lucas.echard $
3
#
3
#
4
# Create an activity report for ALCASAR every week (sunday at 5.35 pm --> see cron.d).
4
# Create an activity report for ALCASAR every week (sunday at 5.35 pm --> see cron.d).
5
# We read configuration files and logs to create cool charts.
5
# We read configuration files and logs to create cool charts.
6
# Written by Raphaël PION, Rexy & Tom HOUDAYER
6
# Written by Raphaël PION, Rexy & Tom HOUDAYER
7
 
7
 
Line 33... Line 33...
33
# COLOR for charts
33
# COLOR for charts
34
COLOR="'#ff0000','#3333cc','#009933','#993300','#1720EE','#D30229','#8D726D','#41C4E4','#8574F4','#A0BC1A','#BFDC1F','#5ADDC3','#B05744','#CD9319','#8CA39B','#D4AA1C','#A76752','#B03088','#445E87','#70424D','#D118C3','#46ABEF','#E9F197','#AEC0D4','#755C79','#94BBD7','#E2E9DC','#8B68D0','#F7EC7C','#1F16B8','#F4DA0A','#2EC17A','#E06483','#48B342','#F510CD','#9B2662','#180E98','#988FC1','#209E4E','#034240','#FDB142','#36B445','#CDD5C9','#6FA0DE','#EE2206','#204E19','#15FC93','#161ECE','#83D33B','#11A44A','#B7BF6C','#87274C','#B52C4F','#AD2805','#427E6C','#91341A','#191315','#FCB290','#13D3CD','#90F0E6','#C870C9','#AD2C14','#201D2A','#E4DB79','#90A919','#FE17FE','#09B35C','#88D950','#3440FC','#A9D42F','#E2DFAC','#DA69EC','#67430A','#43E94E','#5F7349','#22CF16','#CF038F','#0F6427','#F7AD0F','#C5E382','#DB49B6','#F760BF','#0BE701','#EF88D8','#79E6D7','#8A2D3D','#435A30','#A3C8AC','#99B118','#A929FF','#08A36D','#0A1654','#6F8283','#E1CA3E','#3E8577','#580FB6','#DB0E16','#386CBE','#FA0C43','#B713C9'"
34
COLOR="'#ff0000','#3333cc','#009933','#993300','#1720EE','#D30229','#8D726D','#41C4E4','#8574F4','#A0BC1A','#BFDC1F','#5ADDC3','#B05744','#CD9319','#8CA39B','#D4AA1C','#A76752','#B03088','#445E87','#70424D','#D118C3','#46ABEF','#E9F197','#AEC0D4','#755C79','#94BBD7','#E2E9DC','#8B68D0','#F7EC7C','#1F16B8','#F4DA0A','#2EC17A','#E06483','#48B342','#F510CD','#9B2662','#180E98','#988FC1','#209E4E','#034240','#FDB142','#36B445','#CDD5C9','#6FA0DE','#EE2206','#204E19','#15FC93','#161ECE','#83D33B','#11A44A','#B7BF6C','#87274C','#B52C4F','#AD2805','#427E6C','#91341A','#191315','#FCB290','#13D3CD','#90F0E6','#C870C9','#AD2C14','#201D2A','#E4DB79','#90A919','#FE17FE','#09B35C','#88D950','#3440FC','#A9D42F','#E2DFAC','#DA69EC','#67430A','#43E94E','#5F7349','#22CF16','#CF038F','#0F6427','#F7AD0F','#C5E382','#DB49B6','#F760BF','#0BE701','#EF88D8','#79E6D7','#8A2D3D','#435A30','#A3C8AC','#99B118','#A929FF','#08A36D','#0A1654','#6F8283','#E1CA3E','#3E8577','#580FB6','#DB0E16','#386CBE','#FA0C43','#B713C9'"
35
 
35
 
36
# Values to create new htdigest user to consult statistique of ACC
36
# Values to create new htdigest user to consult statistique of ACC
37
DIR_KEY="/usr/local/etc/digest"
37
DIR_KEY="/usr/local/etc/digest"
38
tmp_account="alcasar"
38
tmp_account="tmp_activityreport"
39
realm="ALCASAR Control Center (ACC)"
39
realm="ALCASAR Control Center (ACC)"
40
password=$(openssl rand -base64 32) #random password (length : 32)
40
password=$(openssl rand -base64 32) #random password (length : 32)
41
SED="/usr/bin/sed -i "
41
SED="/usr/bin/sed -i "
42
TMP_STATS="$DIR_TMP/stats.html"
42
TMP_STATS="$DIR_TMP/stats.html"
43
TMP_STATS_2="$DIR_TMP/stats2.html"
43
TMP_STATS_2="$DIR_TMP/stats2.html"