First commit

This commit is contained in:
Ivan Vazhenin
2023-03-12 16:40:33 +03:00
commit 54fa589261
44 changed files with 3339 additions and 0 deletions

View File

@@ -0,0 +1,34 @@
# path to enserver main file
ENSERVER="/usr/lib/python2.7/dist-packages/enserver/enserver.py"
PIDFILE="/var/run/apsh/enserver.pid"
# logging options
LOGFILE="/var/log/apsh/enserver/enserver.log"
# log level {DEBUG,INFO,WARNING,ERROR,CRITICAL}
LOGLEVEL="INFO"
# DB options
DB_HOST="pgsql"
DB_PORT="5432"
DB_NAME="enserver"
DB_USER="db_apsh"
DB_PASSWD="12345678"
# path to enserver storage
STORAGE="/share/store/enserver/storage"
# local enserver id
SERVERID="enserver_astra"
# local ip-address
ADDRESS="enserv"
# providers options
AUTH_PROVIDER="http://apsh@userv:8008/xmlrpc"
# subscribes options
SUBSCRIBER_USERVER="http://userv:8008/xmlrpc"
SUBSCRIBER_CDSERVER="http://cdserv:8080/Transport"
# connection options
TCP_PORT=7001
TCP_TIMEOUT=90
DISCONNECT_TIMEOUT="7"
CDSERVER_REPLICATION="http://cdserv:8080/Replication"
REPLICATION_PROVIDER="$CDSERVER_REPLICATION"
# required for parent bank - uncomment next line and add to unit file param '--host ${HOST}'
# unit file path: /etc/systemd/system/enserver.service
#HOST="bnd"

View File

@@ -0,0 +1,8 @@
/var/log/apsh/enserver.log {
size 10M
rotate 10
notifempty
compress
copytruncate
delaycompress
}

View File

@@ -0,0 +1,22 @@
# Contents of /etc/systemd/system/enserver.service
[Unit]
Description=En-Server
After=network.target
[Service]
CapabilitiesParsec=PARSEC_CAP_PRIV_SOCK
AmbientCapabilities=CAP_IPC_LOCK
CapabilityBoundingSet=CAP_IPC_LOCK
Type=simple
User=apsh
Group=apsh
EnvironmentFile=/etc/default/enserver
Restart=always
RestartSec=30s
PIDFile=/var/run/apsh/enserver.pid
WorkingDirectory=/usr/lib/python2.7/dist-packages/enserver/
ExecStart=/usr/bin/python ${ENSERVER} --debug --id=${SERVERID} --loglevel ${LOGLEVEL} --logfile ${LOGFILE} --pidfile
${PIDFILE} --address ${ADDRESS} --port ${TCP_PORT} --tcp-timeout ${TCP_TIMEOUT} --db-name ${DB_NAME} --db-user ${DB_USER} --db-port ${DB_PORT} --db-host ${DB_HOST} --db-passwd ${DB_PASSWD} --storage ${STORAGE} --auth-provider ${AUTH_PROVIDER} --disconnect_timeout ${DISCONNECT_TIMEOUT} --replication-provider ${REPLICATION_PROVIDER} ${SUBSCRIBER_USERVER} ${SUBSCRIBER_CDSERVER}
[Install]
WantedBy=multi-user.target