# 
# /etc/szarp/szarp.cfg template file
#
# This template should be included by szarp.cfg file using $include
# directive, after setting value of $prefix$ variable.
# Settings in szarp.cfg may override settings from template
#

#
# __INSTALL_DIR__ - installation prefix - default is /opt/szarp
#

# $prefix$ variable must be set


# GLOBAL SECTION
# if parameter is not found in specified sections, it is searched in global
:global

# main SZARP directory
$szarp_root$:="__INSTALL_DIR__"
szarp_data_root=$szarp_root$

# configuration name (aka 'prefix')
config_prefix=$prefix$

# graphical frontend for sudo
$su_command$:="kdesu"
su_command=$su_command$

# SZARP programs directory
$szarp_bin$:="$szarp_root$/bin"

# SZARP configuration directory
$config_root$:="$szarp_root$/$prefix$/config"

# SZARP resources directory
$resources_root$:="$szarp_root$/resources"

# path to PTT.act file
PTT=$szarp_root$/$prefix$

# IPK configuration file path
IPK=$config_root$/params.xml

# path used for IPC identifiers
parcook_path=$szarp_root$/$prefix$

# path to parcook.cfg file
# TODO: obsolete file, some other path should be used
parcook_cfg=$config_root$/parcook.cfg

# main configuration directory
prefix=$db_root$/$prefix$

# directory with lineX.cfg used for IPC identifiers
# TODO: obsolete files, some other path should be used
linex_cfg=$config_root$

# main szbase directory
$datadir$:="$szarp_root$/$prefix$/szbase"
datadir=$datadir$

parcook_socket_uri=tcp://127.0.0.1:4567

$sz4dir$:="$szarp_root$/$prefix$/szbase"
sz4dir=$sz4dir$

# szbase stamp file
szbase_stamp=$szarp_root$/$prefix$/szbase_stamp

# log level, default is 2
$if $debug$<>""
log_level=$debug$
$else
log_level=2
$end

:sz4
heartbeat_frequency=10
saving_interval=60

:datapaf

# path to DataPaf driver config file
cfgfile=$config_root$/datapaf.cfg


:fp2001

# path to FP2001 driver config file
cfgfile=$config_root$/fp2001.cfg


:execute

# default rsync options
$rsync_options$:="-az --rsh=ssh --exclude='.*' --exclude='nohup.out' --delete --force"

# additional rsync options for szbase database 
$szbase_extra$:=" --include=`date +%Y%m.szb` --include=`date +%Y%m -d '1 month ago'`.szb --exclude='*.szb'"

# log file for executed commands' stdout
execute_stdout=$szarp_root$/logs/execute_stdout.log

# log file for executed commands' stderr
execute_stderr=$szarp_root$/logs/execute_stderr.log


:meaner3

# meaner3 log file
log=meaner3

:prober
log=prober
# directory with 10-seconds probes cache
cachedir=/var/cache/szarp
# number of full months to keep
months_count=2

:probes_server
log=probes_server
# address of interface to listen on, empty means 'any'
address=
# port to listen on
port=8090

:available_probes_servers
# list of reachable probes servers
servers=local_probes_server

# address of server running $prefix$ configuration
:local_probes_server
prefix=$prefix$

address=$prefix$

port=8090

:szbwriter
# szbwriter log file
$if "$log$" <> ""
log=$log$
$else
log=/opt/szarp/logs/szbwriter
$end

:parcook
log=parcook

:paramd
log=paramd
# list of servers to run
servers=local_paramd remote_paramd paramd_for_raporter

:sender
log=sender

:local_paramd

port=8081
allowed_ip=127.0.0.1

:remote_paramd

port=8082
ssl=yes
auth=yes
keypass=paramd
access=$szarp_root$/resources/paramd_access.conf
key=$szarp_root$/resources/server.pem
cert=$szarp_root$/resources/server.ca

:paramd_for_raporter

port=8083
allowed_ip=@(192.168.*.*|172.*.*.*|127.*.*.*)

:scc
# default menu configuration for SZARP command center:
$dont_group_string$:="ciepłownia\",\"Węz([eę]ł|ły)\",\"^(MP|Z|P)?EC$\",\"^ZC$\",\"Południe\",\"komora\",\"Samsony?\",\"Praterm\",\"dane\",\"Kompaktu?\",\
\"przenośny\",\"ZOZ\",\"centrum\",\"zbiorcza\",\"security\",\"miejsk?\",\"centrala\",\"Wydział\""
menu= CONFIG("$prefix$"), \
	SEPARATOR, \
	DRAWS(".*"), \
	SEPARATOR, \
	DOC, ICON("$resources_root$/wx/icons/szarp16.xpm"), \
	DONTGROUPBY("$dont_group_string$")


# should we hide configurations that are parts of 'aggregated' configurations 
# already available in menu?
# default is to exclude them from menu.
#hide_aggregated=yes

# prefixes that are not treaded as aggregated when 'hide_aggregated' is set to 'yes'
#dont_aggregate=ptmX,zamX
dont_aggregate=ptmX

# 'update command', if not exists, scc won't show this option in menu
update_command=__INSTALL_DIR__/bin/update_script.sh

# which program to use for DRAW and CONFIG elements
$if platform("")="windows"
$ekstraktor3$:="yes"
$else
$ekstraktor3$:="no"
$end

# should we use ekstraktor3 in CONFIG
use_ekstraktor3=$ekstraktor3$

:sss
# path to private key
key_file=/etc/szarp/sss_key.pem
# path to certificate
ca_file=/etc/szarp/sss_ca.pem
# user to run as
user=sss
# server port
port=23
# users database file
userdbfile=/etc/szarp/sss_users.xml


:koper
# name of parameter displayed
param=Sieć:Sterownik:Finansowa strata sumaryczna R

# when to reset date, crontab format (minute, hour, day, month)
1st_date_reset=0 0 1 1,7

# when to reset short-time date
2nd_date_reset=0 0 * *

# font texture
texfile=$resources_root$/wx/koper/terra.png

# background texture
backfile=$resources_root$/wx/koper/starfield.png

# arrow texture
conefile=$resources_root$/wx/koper/redcube.png

# font file
fontfile=/usr/share/fonts/truetype/msttcorefonts/Arial_Bold.ttf

:parhub
sub_addr=tcp://*:56661
pub_addr=tcp://*:56662
sub_conn_addr=tcp://127.0.0.1:56661
pub_conn_addr=tcp://127.0.0.1:56662


# DO NOT REMOVE THIS LINE AND DO NOT PLACE ANY OTHER SECTIONS AFTER IT
:global

# vim:set ft=libpar:
