Skip to content

Instantly share code, notes, and snippets.

@Kirill
Created April 13, 2021 14:59
Show Gist options
  • Save Kirill/b3e6fa632418388ff072703b5b563385 to your computer and use it in GitHub Desktop.
Save Kirill/b3e6fa632418388ff072703b5b563385 to your computer and use it in GitHub Desktop.
1C Service ln -s /opt/1C/v8.3 /opt/1C/current More: https://infostart.ru/public/1341653/
[Unit]
Description=1C:Enterprise Server 8.3 (%I)
Requires=network.target
[Service]
Type=simple
User=usr1cv8
Group=grp1cv8
# Path to directory with claster data
Environment=SRV1CV8_DATA=/home/usr1cv8/.1cv8/1C/1cv8/
# Number of the cluster port created by default during first
# launch of ragent
Environment=SRV1CV8_PORT=1540
# Number of cluster agent main port. This port is used by the
# cluster console to address the central server. Cluster agent
# port is also specified as the IP port of the working server.
Environment=SRV1CV8_REGPORT=1541
# Port range for connection pool
Environment=SRV1CV8_RANGE=1560:1591
# Security level:
# 0 - unprotected connections
# 1 - protected connections only for the time of user
# authentication
# 2 - permanently protected connections
Environment=SRV1CV8_SECLEV=0
# 1C:Enterprise server configuration debug mode
# blank - default - debug mode is off
# -debug - debug mode is on
#
Environment=SRV1CV8_DEBUG=
# Check period for connection loss detector, milliseconds
Environment=SRV1CV8_PING_PERIOD=1000
# Response timeout for connection loss detector, milliseconds
Environment=SRV1CV8_PING_TIMEOUT=5000
# 1C:Enterprise server keytab file.
# default - usr1cv83.keytab file in 1C:Enterprise server
# installation directory
Environment=KRB5_KTNAME=/opt/1cv8/x86_64/%I/usr1cv8.keytab
#ExecStart=/bin/sh -c "/opt/1cv8/x86_64/%I/ragent -d ${SRV1CV8_DATA} -port ${SRV1CV8_PORT} -regport ${SRV1CV8_REGPORT} -range ${SRV1CV8_RANGE} \
#-seclev ${SRV1CV8_SECLEV} -pingPeriod ${SRV1CV8_PING_PERIOD} -pingTimeout ${SRV1CV8_PING_TIMEOUT} ${SRV1CV8_DEBUG}"
ExecStart=/bin/sh -c "/opt/1C/%I/x86_64/ragent -d ${SRV1CV8_DATA} -port ${SRV1CV8_PORT} -regport ${SRV1CV8_REGPORT} \
-range ${SRV1CV8_RANGE} -seclev ${SRV1CV8_SECLEV} -pingPeriod ${SRV1CV8_PING_PERIOD} -pingTimeout ${SRV1CV8_PING_TIMEOUT} ${SRV1CV8_DEBUG}"
Restart=always
RestartSec=5
PrivateTmp=yes
[Install]
DefaultInstance=current
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment