Add the environment file to the systemd unit.

This commit is contained in:
Andrea Dell'Amico 2021-06-04 15:28:58 +02:00
parent d26c1427e4
commit 9c9425923f
Signed by: andrea.dellamico
GPG Key ID: 147ABE6CEB9E20FF
2 changed files with 6 additions and 6 deletions

View File

@ -1,8 +1,8 @@
export ORIENTDB_DIR="{{ orientdb_home_prefix }}/{{ orientdb_user }}/{{ orientdb_dir }}" ORIENTDB_DIR="{{ orientdb_home_prefix }}/{{ orientdb_user }}/{{ orientdb_dir }}"
export ORIENTDB_USER="{{ orientdb_user }}" ORIENTDB_USER="{{ orientdb_user }}"
export ORIENTDB_OPTS_MEMORY="{{ orientdb_java_heap }}" ORIENTDB_OPTS_MEMORY="{{ orientdb_java_heap }}"
export ORIENTDB_SETTINGS="{{ orientdb_default_settings }}" ORIENTDB_SETTINGS="{{ orientdb_default_settings }}"
ORIENTDB_SERVER_OPTS= ORIENTDB_SERVER_OPTS=
{% if orientdb_distributed %} {% if orientdb_distributed %}
ORIENTDB_SERVER_OPTS="-Ddistributed=true" ORIENTDB_SERVER_OPTS="-Ddistributed=true"
{% endif %} {% endif %}

View File

@ -7,6 +7,7 @@ After=syslog.target
WantedBy=multi-user.target WantedBy=multi-user.target
[Service] [Service]
EnvironmentFile=/etc/default/orientdb
Type=simple Type=simple
User={{ orientdb_user }} User={{ orientdb_user }}
Group={{ orientdb_user }} Group={{ orientdb_user }}
@ -17,5 +18,4 @@ StandardError=syslog
SyslogIdentifier=orientdb SyslogIdentifier=orientdb
ExecStart={{ orientdb_home_prefix }}/{{ orientdb_user }}/{{ orientdb_dir }}/bin/server.sh ExecStart={{ orientdb_home_prefix }}/{{ orientdb_user }}/{{ orientdb_dir }}/bin/server.sh
ExecStop={{ orientdb_home_prefix }}/{{ orientdb_user }}/{{ orientdb_dir }}/bin/shutdown.sh ExecStop={{ orientdb_home_prefix }}/{{ orientdb_user }}/{{ orientdb_dir }}/bin/shutdown.sh
ExecStatus={{ orientdb_home_prefix }}/{{ orientdb_user }}/{{ orientdb_dir }}/bin/orientdb.sh status
ExecReload=/bin/kill -HUP $MAINPID ExecReload=/bin/kill -HUP $MAINPID