ansible-role-orientdb/templates/orientdb.service.j2

26 lines
684 B
Django/Jinja

[Unit]
Description=OrientDB Server
After=network.target
After=syslog.target
[Install]
WantedBy=multi-user.target
[Service]
EnvironmentFile=/etc/default/orientdb
Type=simple
User={{ orientdb_user }}
Group={{ orientdb_user }}
Restart=always
RestartSec=10
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=orientdb
{% if orientdb_distributed %}
ExecStart={{ orientdb_home_prefix }}/{{ orientdb_user }}/{{ orientdb_dir }}/bin/dserver.sh
{% else %}
ExecStart={{ orientdb_home_prefix }}/{{ orientdb_user }}/{{ orientdb_dir }}/bin/server.sh
{% endif %}
ExecStop={{ orientdb_home_prefix }}/{{ orientdb_user }}/{{ orientdb_dir }}/bin/shutdown.sh
ExecReload=/bin/kill -HUP $MAINPID