Skip to content
Snippets Groups Projects
Commit 9f8d8a03 authored by Dmitry E. Oboukhov's avatar Dmitry E. Oboukhov
Browse files

Init sccript for dist.lua.

parent 539b46d8
No related branches found
No related tags found
No related merge requests found
...@@ -17,8 +17,8 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin ...@@ -17,8 +17,8 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin
CONF_DIR=/etc/tarantool/instances.enabled CONF_DIR=/etc/tarantool/instances.enabled
SCRIPTNAME=/etc/init.d/tarantool SCRIPTNAME=/etc/init.d/tarantool
DAEMON=/usr/bin/tarantool DAEMON=/usr/bin/tarantool
INSTANCES=`find $CONF_DIR -xtype f -name '*.cfg'` INSTANCES=`find $CONF_DIR -xtype f -name '*lua'`
INSTSCRIPT=/usr/sbin/tarantool_instance DIST_LUA=/usr/lib/tarantool/dist.lua
# Exit if the package is not installed # Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0 [ -x "$DAEMON" ] || exit 0
...@@ -26,7 +26,7 @@ INSTSCRIPT=/usr/sbin/tarantool_instance ...@@ -26,7 +26,7 @@ INSTSCRIPT=/usr/sbin/tarantool_instance
. /lib/init/vars.sh . /lib/init/vars.sh
if test -z "$INSTANCES"; then if test -z "$INSTANCES"; then
echo "tarantool: There are no instances in $CONF_DIR" echo "tarantool: There are no instances (*.lua) in $CONF_DIR"
exit 0 exit 0
fi fi
...@@ -35,9 +35,9 @@ fi ...@@ -35,9 +35,9 @@ fi
# Function that starts the daemon/service # Function that starts the daemon/service
# #
do_start() { do_start() {
echo "tarantool: Staring instances" echo "tarantool: Starting instances"
for inst in $INSTANCES; do for inst in $INSTANCES; do
$INSTSCRIPT $inst start $DAEMON $DIST_LUA start `basename $inst .lua`
done done
return 0 return 0
} }
...@@ -48,7 +48,7 @@ do_start() { ...@@ -48,7 +48,7 @@ do_start() {
do_stop() { do_stop() {
echo "tarantool: Stopping instances" echo "tarantool: Stopping instances"
for inst in $INSTANCES; do for inst in $INSTANCES; do
$INSTSCRIPT $inst stop $DAEMON $DIST_LUA stop `basename $inst .lua`
done done
return 0 return 0
} }
......
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