Skip to content
Snippets Groups Projects
Commit 6688b478 authored by Roman Tsisyk's avatar Roman Tsisyk
Browse files

Fix #1330: tarantoolctl uses a wrong instance file

Use instance.available only with systemd if sysvinit is not enabled.
Otherwise (sysvinit or mixed configuration) continue to use
instance.enabled.
parent 8e7a5bc9
No related branches found
No related tags found
No related merge requests found
......@@ -38,6 +38,12 @@ set(SYSCONFIG_AVAILABLEDIR "tarantool/instances.available")
set(SYSCONFIG_ENABLEDDIR "tarantool/instances.enabled")
set(TARANTOOL_AVAILABLEDIR "${CMAKE_INSTALL_FULL_SYSCONFDIR}/${SYSCONFIG_AVAILABLEDIR}")
set(TARANTOOL_ENABLEDDIR "${CMAKE_INSTALL_FULL_SYSCONFDIR}/${SYSCONFIG_ENABLEDDIR}")
if(WITH_SYSTEMD AND NOT WITH_SYSVINIT)
# Don't use instances.enabled on systemd distros
set(TARANTOOL_INSTANCEDIR "${TARANTOOL_AVAILABLEDIR}")
else()
set(TARANTOOL_INSTANCEDIR "${TARANTOOL_ENABLEDDIR}")
endif()
configure_file(default/tarantool.in default/tarantool @ONLY)
install (FILES ${CMAKE_CURRENT_BINARY_DIR}/default/tarantool DESTINATION
......
......@@ -24,5 +24,5 @@ default_cfg = {
-- instances.available - all available instances
-- instances.enabled - instances to autostart by sysvinit
instance_dir = "@TARANTOOL_AVAILABLEDIR@"
instance_dir = "@TARANTOOL_INSTANCEDIR@"
-- vim: set ft=lua :
......@@ -14,10 +14,13 @@ After=network.target
Documentation=man:tarantool(1)
# Created by package
AssertPathIsDirectory=@TARANTOOL_AVAILABLEDIR@
AssertPathIsReadWrite=@TARANTOOL_DATADIR@
AssertPathIsReadWrite=@TARANTOOL_LOGDIR@
# Created by systemd-tmpfiles
AssertPathIsReadWrite=@TARANTOOL_RUNDIR@
# Instance file
ConditionPathExists=@TARANTOOL_AVAILABLEDIR@/%I.lua
[Service]
Type=forking
......@@ -38,3 +41,4 @@ RestartSec=100ms
[Install]
WantedBy=multi-user.target
DefaultInstance=example
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment