diff --git a/templates/orientdb.default.j2 b/templates/orientdb.default.j2 index f77cbc6..4496c4a 100644 --- a/templates/orientdb.default.j2 +++ b/templates/orientdb.default.j2 @@ -1,8 +1,8 @@ -export ORIENTDB_DIR="{{ orientdb_home_prefix }}/{{ orientdb_user }}/{{ orientdb_dir }}" -export ORIENTDB_USER="{{ orientdb_user }}" -export ORIENTDB_OPTS_MEMORY="{{ orientdb_java_heap }}" -export ORIENTDB_SETTINGS="{{ orientdb_default_settings }}" +ORIENTDB_DIR="{{ orientdb_home_prefix }}/{{ orientdb_user }}/{{ orientdb_dir }}" +ORIENTDB_USER="{{ orientdb_user }}" +ORIENTDB_OPTS_MEMORY="{{ orientdb_java_heap }}" +ORIENTDB_SETTINGS="{{ orientdb_default_settings }}" ORIENTDB_SERVER_OPTS= {% if orientdb_distributed %} ORIENTDB_SERVER_OPTS="-Ddistributed=true" -{% endif %} \ No newline at end of file +{% endif %} diff --git a/templates/orientdb.service.j2 b/templates/orientdb.service.j2 index 1626581..d70c49c 100644 --- a/templates/orientdb.service.j2 +++ b/templates/orientdb.service.j2 @@ -7,6 +7,7 @@ After=syslog.target WantedBy=multi-user.target [Service] +EnvironmentFile=/etc/default/orientdb Type=simple User={{ orientdb_user }} Group={{ orientdb_user }} @@ -17,5 +18,4 @@ StandardError=syslog SyslogIdentifier=orientdb ExecStart={{ orientdb_home_prefix }}/{{ orientdb_user }}/{{ orientdb_dir }}/bin/server.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