Основные возможности:

  • Позволяет собрать исходный и бинарный пакеты rpm Free-SA версии 1.5.1 в openSUSE 10.3-11.1.

Описание:

Spec файл free-sa.spec разработан для сборки rpm пакета Free-SA (http://sourceforge.net/projects/free-sa).

Для корректной сборки пакета используется:

  • free-sa-1.5.1.patch (патч)
  • free-sa-1.5.1.report (скрипт для создания отчета по дням, неделям и месяцам)
  • free-sa-1.5.1.report.README (описание для скрипта создания отчета по дням, неделям и месяцам)
  • free-sa-1.5.1.report.conf (файл конфигурации для создания отчетов)
  • free-sa-1.5.1.sysconfig (настройки sysconfig для скрипта создания отчетов)
  • free-sa-1.5.1.tar.gz (исходный код http://sourceforge.net/projects/free-sa)
  • free-sa-1.5.1.theme (скрипт управления темами)
  • free-sa-1.5.1.theme.README (описание для скрипта управления темами)
  • free-sa.spec (файл спецификации)

Сборка:

  • Поместить free-sa-1.5.1.patch, free-sa-1.5.1.report, free-sa-1.5.1.report.conf, free-sa-1.5.1.sysconfig, free-sa-1.5.1.tar.gz, free-sa-1.5.1.theme, free-sa-1.5.1.theme.README в /usr/src/packages/SOURCES
  • Поместить free-sa.spec в /usr/src/packages/SPECS
  • Выполнить сборку: rpmbuild -bb /usr/src/packages/SPECS/free-sa.spec
  • Получить пакет в зависимости от архитектуры, например: /usr/src/packages/RPMS/i586/free-sa-1.5.1-1.i586.rpm
  • Установить:
    host:/home/packager # rpm -ivh /usr/src/packages/RPMS/i586/free-sa-1.5.1-1.i586.rpm
    Подготовка...     ########################################### [100%]
       1:free-sa                ########################################### [100%]
    host:/home/packager #
    
  • После установки пакета, перед использованием скрипта создания отчетов - проверьте настройки и рекомендации /etc/sysconfig/free-sa
    Для запуска скрипта от имени squid можно воспользоваться cron`ом.

Примечание. Готовые сборки для openSUSE 10.3-11.1 доступны на openSUSE Build Service. Репозитарий http://download.opensuse.org/repositories/home:/nk_rec/

Примеры файлов для сборки rpm пакета Free-SA:

(Скачать комплект можно будет здесь. ЗЫ Не тыкать! Жать правой кнопкой: сохранить ссылку как...)
Примечание: исходный код free-sa-1.5.1.tar.gz не включен в архив, можно взять с официального сайта проекта http://sourceforge.net/projects/free-sa

Условия:

  • Установлены: httpd (например Apache), http_proxy (squid), компилятор gcc.
    Подробности установки смотрите в документации на соответствующие продукты.
  • Каталог HTMLOUT free-sa: /srv/www/htdocs/free-sa (права:0755,squid,root)
  • Бинарник free-sa: /usr/bin/free-sa
  • Каталог ETCDIR free-sa: /etc/free-sa
  • Каталог DATADIR free-sa: /usr/share/free-sa
  • Каталог TMPDIR free-sa: /var/cache/free-sa (права:0750,squid,root)
  • Скрипт создания отчета : /usr/sbin/free-sa-report
  • Скрипт управления темами: /usr/sbin/free-sa-theme
Примечание:на каталоги /var/cache/free-sa и /srv/www/htdocs/free-sa установлен владелец squid из предположения, что анализатор будет запускаться в планировщике cron от имени пользователя squid (это в свою очередь необходимо для доступа к логам squid`а).

Текст спецификации free-sa.spec:

Name:           free-sa
# List of additional build dependencies
#BuildRequires:  gcc-c++ libxml2-devel
Version:        1.5.1
Release:        1
License:        GPL v3
Source0:        %{name}-%{version}.tar.gz
Source1:        %{name}-%{version}.theme
Source2:        %{name}-%{version}.theme.README
Source3:        %{name}-%{version}.report
Source4:        %{name}-%{version}.report.conf
Source5:        %{name}-%{version}.report.README
Source6:        %{name}-%{version}.sysconfig
Patch:          %{name}-%{version}.patch
Group:          Productivity/Networking/Web/Utilities
Summary:        Free-SA - statistic analyzer
Requires:       httpd, http_proxy
PreReq:         %fillup_prereq
 
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
%description
Free-SA is statistic analyzer for daemons log files similar to SARG.
Its main advantages over SARG are much better speed (7x-20x times),
more reports support, crossplatform work and W3C compliance of
generated HTML/CSS reports code.
 
 
%prep
%setup -q
%patch -p0
 
%build
export ADDCFLAGS="$RPM_OPT_FLAGS"
make
 
 
%install
make DESTDIR=%buildroot install
%__rm -f %buildroot%{_datadir}/%{name}/wwwroot/themes/default
%__rm -f %buildroot%{_datadir}/%{name}/wwwroot/*.png
%__rm -f %buildroot%{_datadir}/%{name}/wwwroot/*.css
%__rm -f %buildroot%{_datadir}/%{name}/wwwroot/sa.js
%__rm -rf %buildroot%{_datadir}/%{name}/wwwroot/cgi-bin
%__mkdir_p -m 0755 %buildroot%{_sbindir}
%__mkdir_p -m 0755 %buildroot/srv/www/htdocs/%{name}/cgi-bin
%__mkdir_p -m 0755 %buildroot/var/adm/fillup-templates
%__install -m 0755 %{_sourcedir}/%{name}-%{version}.theme %buildroot%{_sbindir}/%{name}-theme
%__install -m 0755 %{_sourcedir}/%{name}-%{version}.report %buildroot%{_sbindir}/%{name}-report
%__install -m 0644 %{_sourcedir}/%{name}-%{version}.theme.README %buildroot%{_docdir}/%{name}/theme.README
%__install -m 0644 %{_sourcedir}/%{name}-%{version}.report.conf %buildroot%{_datadir}/%{name}/%{name}-report.conf
%__install -m 0644 %{_sourcedir}/%{name}-%{version}.report.conf %buildroot%{_sysconfdir}/%{name}/%{name}.conf
%__install -m 0644 %{_sourcedir}/%{name}-%{version}.report.README %buildroot%{_docdir}/%{name}/report.README
%__install -m 0644 %{_sourcedir}/%{name}-%{version}.sysconfig %buildroot/var/adm/fillup-templates/sysconfig.%{name}
%__install -m 0644 themes/rbsec/* %buildroot/srv/www/htdocs/%{name}
%__install -m 0644 themes/sa.js %buildroot/srv/www/htdocs/%{name}
%__install -m 0755 src/%{name}.cgi %buildroot/srv/www/htdocs/%{name}/cgi-bin
 
%clean
rm -rf %buildroot
 
%post
%{fillup_only -n free-sa}
 
%files
%defattr(-,root,root)
%dir %{_sysconfdir}/%{name}
%dir %{_datadir}/%{name}
%dir %{_datadir}/%{name}/languages
%dir %{_datadir}/%{name}/wwwroot
%dir %{_datadir}/%{name}/wwwroot/themes
%dir %{_datadir}/%{name}/wwwroot/themes/blues
%dir %{_datadir}/%{name}/wwwroot/themes/qbiq
%dir %{_datadir}/%{name}/wwwroot/themes/rbsec
%dir %{_datadir}/%{name}/wwwroot/themes/sarg
%dir %{_datadir}/%{name}/wwwroot/themes/silver
%dir %attr(-,squid,root) /srv/www/htdocs/%{name}
%dir /srv/www/htdocs/%{name}/cgi-bin
%dir %{_docdir}/%{name}
%dir %attr(0750,squid,root) %{_localstatedir}/cache/%{name}
%{_bindir}/%{name}
%{_sbindir}/%{name}-report
%{_sbindir}/%{name}-theme
%config(noreplace) %{_sysconfdir}/%{name}/*
/var/adm/fillup-templates/sysconfig.%{name}
%{_datadir}/%{name}/%{name}-report.conf
%{_datadir}/%{name}/languages/*
%{_datadir}/%{name}/wwwroot/themes/sa.js
%{_datadir}/%{name}/wwwroot/themes/blues/*
%{_datadir}/%{name}/wwwroot/themes/qbiq/*
%{_datadir}/%{name}/wwwroot/themes/rbsec/*
%{_datadir}/%{name}/wwwroot/themes/sarg/*
%{_datadir}/%{name}/wwwroot/themes/silver/*
/srv/www/htdocs/%{name}/*.*
/srv/www/htdocs/%{name}/cgi-bin/%{name}.cgi
%doc %{_docdir}/%{name}/*
%doc %{_mandir}/man1/*
%doc %{_mandir}/man5/*
 
 
%changelog
* Tue Mar 3 2009 Konstantin Nadezhdin nk_rec @ mail.ru
- changed free-sa-report to version 1.1
* Tue Feb 17 2009 Konstantin Nadezhdin nk_rec @ mail.ru
- added report.README
* Wed Feb 11 2009 nk_rec @ mail.ru
- packaged free-sa version 1.5.1 using the buildservice spec file wizard
- renamed free-satheme.sh to free-sa-theme
- replaced free-sa-1.5.1-global.mk.patch by free-sa-1.5.1.patch
- added theme.README and free-sa-report
* Tue Jan 13 2009 Konstantin Nadezhdin nk_rec @ mail.ru
- added free-sa-1.5.1-global.mk.patch
- added free-satheme.sh theme switching script
 

Текст патча free-sa-1.5.1.patch:

--- global.mk  2008-12-13 20:02:27.000000000 +0300
+++ global.mk  2009-02-11 11:22:48.000000000 +0300
@@ -6,17 +6,19 @@
 DEBUG = 0
 
 # installation path
-PREFIX = /usr/local
+PREFIX = $(DESTDIR)/usr
 # etc dir
-ETCDIR = $(PREFIX)/etc/$(PROGLNAME)
+ETCDIR = $(DESTDIR)/etc/$(PROGLNAME)
 # where put reports (you can change it later via free-sa.conf configuration file)
-WWWDIR = $(PREFIX)/var/www/htdocs/$(PROGLNAME)
+WWWDIR = $(PREFIX)/share/$(PROGLNAME)/wwwroot
 # dir for temporary data storing (you can change it later via free-sa.conf configuration file)
-TMPDIR = /var/cache/$(PROGLNAME)
+TMPDIR = $(DESTDIR)/var/cache/$(PROGLNAME)
 # where localisation files to put (it is safe to leave default value unchanged)
-LOCDIR = $(PREFIX)/share/$(PROGLNAME)
+LOCDIR = $(PREFIX)/share/$(PROGLNAME)/languages
 # where documentation files to put
-DOCDIR = $(PREFIX)/share/doc/$(PROGLNAME)-$(PROGVERSION)
+DOCDIR = $(PREFIX)/share/doc/packages/$(PROGLNAME)
+# mandir
+MANDIR = $(PREFIX)/share/man
 # where log file lives (you can change it later via free-sa.conf configuration file)
 LOGFILE = /var/log/squid/access.log
 
@@ -128,8 +130,8 @@
 INSTALLODR = $(INSTALL) -m 0700 -v -d
 
 # All text files variable->value replacer
-SEDREPLACE = sed -e 's|LOGFILE|$(LOGFILE)|g'   -e 's|TMPDIR|$(TMPDIR)|g'           -e 's|ETCDIR|$(ETCDIR)|g' \
-                 -e 's|WWWDIR|$(WWWDIR)|g'     -e 's|PREFIX|$(PREFIX)|g'                                     \
+SEDREPLACE = sed -e 's|LOGFILE|$(LOGFILE)|g'   -e 's|TMPDIR|/var/cache/$(PROGLNAME)|g' -e 's|ETCDIR|/etc/$(PROGLNAME)|g'   \
+                 -e 's|WWWDIR|/srv/www/htdocs/$(PROGLNAME)|g'            -e 's|PREFIX|/usr/share|g'          \
                  -e 's|PROGNAME|$(PROGNAME)|g' -e 's|PROGVERSION|$(PROGVERSION)|g'                           \
                  -e 's|PROGURL|$(PROGURL)|g'   -e 's|PROGLNAME|$(PROGLNAME)|g'                               \
                  -e 's|PROGCOPYRIGHT|$(PROGCOPYRIGHT)|g'
--- man/Makefile  2007-09-22 05:08:51.000000000 +0400
+++ man/Makefile  2009-02-11 10:56:21.000000000 +0300
@@ -14,8 +14,8 @@
 
 install: all
   @(                      \
-  $(INSTALLDIR) $(PREFIX)/man/man1;              \
-  $(INSTALLDIR) $(PREFIX)/man/man5;              \
-  $(INSTALLFIL) ./.libs/$(PROGLNAME).1 $(PREFIX)/man/man1;        \
-  $(INSTALLFIL) ./.libs/$(PROGLNAME).conf.5 $(PREFIX)/man/man5;        \
+  $(INSTALLDIR) $(MANDIR)/man1;              \
+  $(INSTALLDIR) $(MANDIR)/man5;              \
+  $(INSTALLFIL) ./.libs/$(PROGLNAME).1 $(MANDIR)/man1;        \
+  $(INSTALLFIL) ./.libs/$(PROGLNAME).conf.5 $(MANDIR)/man5;        \
   )
 

Текст скрипта для создания отчета по дням, неделям и месяцам free-sa-1.5.1.report:

#!/bin/sh
#
# free-sa-report
# Report generate script for Free-SA
# Author: Konstantin Nadezhdin nk_rec @ mail.ru
# Version: 1.1
#
# Read sysconfig
if [ -s /etc/sysconfig/free-sa ]; then
    . /etc/sysconfig/free-sa
else
    echo "Error: /etc/sysconfig/free-sa not exist!"
    exit
fi
 
FREE_SA=/usr/bin/free-sa
if [ "$USE_FREE_SA_REPORT" != "yes" ]; then
    echo "Error: free-sa-report disabled in /etc/sysconfig/free-sa"
    exit
fi
 
if [ "$ACCESSLOG" = "" ]; then
    ACCESSLOG=/var/log/squid/access.log
elif [ ! -s $ACCESSLOG ]; then
    echo "$ACCESSLOG not exist!"
    exit
fi
 
if [ "$HTMLOUT" = "" ]; then
    HTMLOUT=/srv/www/htdocs/free-sa
elif [ ! -d $HTMLOUT ]; then
    echo "$HTMLOUT not exist or isn't directory!"
    exit
fi
 
if [ "$FREE_SA_CONF" = "" ]; then
    FREE_SA_CONF=/usr/share/free-sa/free-sa-report.conf
elif [ ! -s $FREE_SA_CONF ]; then
    echo "$FREE_SA_CONF not exist!"
    exit
fi
 
if [ "$TMPDIR" = "" ]; then
    TMPDIR=/var/cache/free-sa
elif [ ! -d $TMPDIR ]; then
    echo "$TMPDIR not exist or isn't directory!"
    exit
fi
 
export LC_TIME=ru_RU.UTF-8
 
FREE_SA_ARCH=$HTMLOUT/archive/free-sa.tar.bz2
MONTH_CONF=$TMPDIR/THISMONTH.conf
WEEK_CONF=$TMPDIR/THISWEEK.conf
DAY_CONF=$TMPDIR/TODAY.conf
 
TODAY=`date "+%Y%m%d"`
let i=`date "+%u"`-1
THISWEEK=`date -d -${i}day '+%d.%m.%Y'`
THISMONTH=`date "+01.%m.%Y"`
THISWEEKNUM=`date "+%V"`
THISMONTHNUM=`date "+%m"`
 
make_index ()
{
    if [ ! -s $HTMLOUT/index.html ]; then
        echo -e "<html>\n\
             <head>\n\
             <META http-equiv=\"content-type\" content=\"text/html; charset=utf-8\">\n\
             <script language=Javascript>\n\
             function change(select) {\n\
                 if( select.options[ select.selectedIndex].value) {\n\
                     select.form.action = select.options[ select.selectedIndex].value;\n\
                     select.form.submit();\n\
                 }\n\
             }\n\
             </script>\n\
             </head>\n\
             <body>\n\
             <h3>Free-SA report</h3>\n\
             <form target='page' name='menuform'>\n\
                <select name='slmenu' onchange='change(this)'>\n\
                    <option selected value=''>-Select reports-</option>\n\
                    <option value = 'day'>Free-SA reports by day</option>\n\
                    <option value = 'week'>Free-SA reports by week</option>\n\
                    <option value = 'month'>Free-SA reports by month</option>\n\
                </select>\n\
             </form>\n\
             </body>\n\
             </html>\n" > $HTMLOUT/index.html
    fi
}
 
bunzip2_archive_log ()
{
    if [ -s $ACCESSLOG-$TODAY.bz2 ]; then
        bunzip2 -k $ACCESSLOG-$TODAY.bz2
    fi
}
 
del_bunzip2ed_log ()
{
    if [ -s $ACCESSLOG-$TODAY ]; then
        rm -f $ACCESSLOG-$TODAY
    fi
}
 
sed_conf ()
{
sed -e 's/^rotate=/#rotate=/' \
    -e 's/^overwrite=/#overwrite=/' \
    -e 's/^name=/#name=/' < $FREE_SA_CONF > $1
}
 
check_conf ()
{
case $1 in
  month)
    sed_conf "$MONTH_CONF"
    echo -e "\nrotate=\"quarter\"\noverwrite=\"2\"\nname=\"THISMONTH\"" >> $MONTH_CONF
    ;;
  week)
    sed_conf "$WEEK_CONF"
    echo -e "\nrotate=\"month\"\noverwrite=\"2\"\nname=\"THISWEEK\"" >> $WEEK_CONF
    ;;
  day)
    sed_conf "$DAY_CONF"
    echo -e "\nrotate=\"week\"\noverwrite=\"2\"\nname=\"TODAY\"" >> $DAY_CONF
    ;;
  *)
    ;;
esac
}
 
read_archive_log ()
{
    if [ -s $ACCESSLOG-$TODAY ]; then
        check_conf $1
        $FREE_SA -l $ACCESSLOG-$TODAY $2
    fi
}
 
check_dir ()
{
    if [ ! -d $HTMLOUT/$1 ]; then
        mkdir $HTMLOUT/$1
    fi
    if [ "$2" = "1" ]; then
        for i in css png js
        do
            cp -pfuv /srv/www/htdocs/free-sa/*.$i $HTMLOUT/$1
        done
    fi
}
 
bunzip2_archive_log
 
#Month
check_dir month 1
check_dir month/var
check_conf month
$FREE_SA -l $ACCESSLOG -f $MONTH_CONF -o $HTMLOUT/month/var -d $THISMONTH-
rm -rf $HTMLOUT/month/lastdate-curdate-$THISMONTHNUM &amp;&amp; mv -f $HTMLOUT/month/var/*.*.*-*.*.* $HTMLOUT/month/lastdate-curdate-$THISMONTHNUM
read_archive_log month "-f $MONTH_CONF -o $HTMLOUT/month -d $THISMONTH-"
check_conf month
$FREE_SA -F -f $MONTH_CONF -o $HTMLOUT/month
 
#Week
check_dir week 1
check_dir week/var
check_conf week
$FREE_SA -l $ACCESSLOG -f $WEEK_CONF -o $HTMLOUT/week/var -d $THISWEEK-
rm -rf $HTMLOUT/week/lastdate-curdate-$THISWEEKNUM &amp;&amp; mv -f $HTMLOUT/week/var/*.*.*-*.*.* $HTMLOUT/week/lastdate-curdate-$THISWEEKNUM
read_archive_log week "-f $WEEK_CONF -o $HTMLOUT/week -d $THISWEEK-"
check_conf week
$FREE_SA -F -f $WEEK_CONF -o $HTMLOUT/week
 
#Day
check_dir day 1
check_conf day
$FREE_SA -l $ACCESSLOG -f $DAY_CONF -o $HTMLOUT/day -d day
read_archive_log day "-f $DAY_CONF -o $HTMLOUT/day -d day"
check_conf day
$FREE_SA -F -f $DAY_CONF -o $HTMLOUT/day
 
rm -rf $TMPDIR/*
 
del_bunzip2ed_log
 
make_index
 
#Archive free-sa
check_dir archive
rm -f $FREE_SA_ARCH
tar -cjf $FREE_SA_ARCH --exclude=archive* -C $HTMLOUT .
 
exit
 

Текст файла конфигурации для создания отчетов free-sa-1.5.1.report.conf:

#
# Sample configuration file for free-sa(1)
#
# copy to /etc/free-sa/free-sa.conf
# and change FREE_SA_CONF in /etc/sysconfig/free-sa
#
 
 
#########
# FILES #
#########
#log="/var/log/squid/access.log"
#usertab="/etc/free-sa/users"
downloads="/etc/free-sa/downloads.sample"
#local_filter=""
#global_filter=""
 
 
###############
# DIRECTORIES #
###############
#targetdir="/srv/www/htdocs/free-sa"
tmpdir="/var/cache/free-sa"
 
 
#####################
# REPORTS SELECTION #
#####################
 
#Generate top sites report (TSR).
ts="true"
 
#Generate proxy authentication faulures report (TTR), i.e. for 407 code.
paf="true"
 
#Generate sites authentication faulures report (TTR), i.e. for 401 code.
saf="true"
 
#Generate proxy denied report (TTR).
pdn="true"
 
#Generate sites denied report (TTR), i.e. for 403 code.
sdn="true"
 
#Generate CONNECT method report (TTR).
cct="true"
 
#Generate PUT/POST method report (TTR).
pst="true"
 
#Generate downloads report (TTR). If true, then set downloads file via 'downloads'  option.
#dld="false"
dld="true"
 
#Generate additional user report with full URLs (UFR). If true, then report generation time increases by ~130%.
fullurl="true"
 
#Generate users report (UR).
users="true"
 
#Generate top user report in text format and send it to e-mail specified by STRING.
#email=""
 
 
##################
# REPORTS LIMITS #
##################
#paf_limit="50"
#saf_limit="50"
#pdn_limit="50"
#sdn_limit="50"
#cct_limit="50"
#pst_limit="50"
#dld_limit="50"
#lcf_limit="50"
#url_limit="50"
url_limit="80"
#ts_limit="0"
#dld_min="0"
#rtr_timeout="5000"
 
 
####################
# OTHER PARAMETERS #
####################
name="free-sa-report"
#autorecords="5"
#logformat="-1"
#fulltraffic="false"
 
#Use user names, provided by log as unique internal name, otherwise use IP.
#inameuser="true"
 
#user_unescape="false"
#indicators="true"
 
# Remove all reports when new one is generated according to rule selected by INTEGER:
#    0      Not remove
#    1      Remove all reports with period equal to period of newly generated  reports  (period is
#    checked with precision of 1 day)
#    2      Remove  all reports with period within period of newly generated reports (period is
#    checked with precision of 1 seconds)
# Note: removing is done AFTER generating new reports.
#overwrite="0"
 
#resolveip="false"
#showinfo="true"
#site=""
#logo=""
#locale="ru_RU.UTF-8"
 
# Delete reports older than:
#rotate=""
 
# Set divisor:
# b or B   bytes        123   456'789   789'123'456
# k        kbytes        0k      446k      770'628k
# K        kbytes     0.12k   446.08k   770'628.37k
# m        Mbytes        0M        0M          753M
# M        Mbytes     0.00M     0.43M       752.56M
# g        Gbytes        0G        0G            1G
# G        Gbytes     0.00G     0.00G        0.734G
# t        Tbytes        0T        0T            0T
# T        Tbytes     0.00T     0.00T         0.00T
# p        Pbytes        0P        0P            0P
# P        Pbytes     0.00P     0.00P         0.00P
# v or V   Varbytes     123      446k          753M
divisor="M"
 
 

Тескт настройки sysconfig free-sa-1.5.1.sysconfig:

## Path:        Applications/Free-SA
## Description: Configuration of free-sa
## Type:        yesno
## Default:     no
#
# Should free-sa-report be enabled to start by cron ("yes" or "no")
#
# To add free-sa-report to crontab.
# First read:
# man crontab
# Then use:
# crontab -u squid -e
# or:
# crontab -u squid path_to_sample_cron_file
#
# Sample cron file:
#
# PATH=/sbin:/bin:/usr/bin
# MAILTO=root
# 0 21 * * * /usr/sbin/free-sa-report
#
USE_FREE_SA_REPORT="yes"
 
## Type:        string
## Default:     "/var/log/squid/access.log"
#
# Path to squid access.log
#
ACCESSLOG="/var/log/squid/access.log"
 
## Type:        string
## Default:     "/srv/www/htdocs/free-sa"
#
# Where free-sa should save reports
#
HTMLOUT="/srv/www/htdocs/free-sa"
 
## Type:        string
## Default:     "/usr/share/free-sa/free-sa-report.conf"
#
# Path to default free-sa-report configuration file
#
FREE_SA_CONF="/usr/share/free-sa/free-sa-report.conf"
 
## Type:        string
## Default:     "/var/cache/free-sa"
#
# Where free-sa-report should create temp configuration
# files for day, week and month reports
#
TMPDIR="/var/cache/free-sa"
 
 

Текст скрипта для управления темами free-sa-1.5.1.theme:

#!/bin/sh
case "$1" in
    1) THEME="blues";;
    2) THEME="qbiq" ;;
    3) THEME="rbsec";;
    4) THEME="sarg";;
    5) THEME="silver";;
    *)
  echo -e "Usage: $0 {1|2|3|4|5}\n Where 1 - blues; 2 - qbiq; 3 - rbsec; 4 - sarg; 5 - silver."
  exit
  ;;
esac
 
THEMEDIR=/usr/share/free-sa/wwwroot/themes
 
if [ -s /etc/sysconfig/free-sa ]; then
    . /etc/sysconfig/free-sa
    if [ "$HTMLOUT" != "" -a -d $HTMLOUT ]; then
        for i in css png; do
            cp -pfv $THEMEDIR/$THEME/*.$i $HTMLOUT/
        done
    else
        echo "Error: $HTMLOUT not set in /etc/sysconfig/free-sa or not exist!"
    fi
else
    echo "Error: /etc/sysconfig/free-sa not exist!"
fi
 

Текст free-sa-1.5.1.theme.README

To change dafault theme:
/usr/sbin/free-sa-theme n
Where n: 1 - blues, 2 - qbiq, 3 - rbsec, 4 - sarg, 5 - silver.