Permalink
Browse files

renamed and moved instance script

  • Loading branch information...
1 parent 7927865 commit 3aed694be1b74973ec77edf352a1b220c58b3d46 @unera unera committed Dec 25, 2011
View
@@ -0,0 +1,3 @@
+Upstream contains some libraries that have already been present in Debian.
+
+Now I work to replace them by debian's copies, but the work requires time.
@@ -10,6 +10,9 @@ PID_DIR=/var/run/tarantool
LOG_DIR=/var/log/tarantool
BOX=/usr/bin/tarantool_box
SSD=start-stop-daemon
+CFG_DIR=/etc/tarantool/instances.enabled
+
+chdir $CFG_DIR
usage="Usage: sh $0 /path/to/config.file start|stop"
@@ -28,6 +31,11 @@ if ! test -r "$CFG"; then
exit 10
fi
+if ! test -x $BOX; then
+ echo "$BOX can't be started"
+ exit 15
+fi
+
NAME=`basename $CFG .cfg`
@@ -1,2 +1,2 @@
debian/etc/example.cfg /etc/tarantool/instances.available/
-debian/scripts/init_instance.sh /usr/lib/tarantool/
+debian/scripts/tarantool_instance /usr/sbin
@@ -18,7 +18,7 @@ CONF_DIR=/etc/tarantool/instances.enabled
SCRIPTNAME=/etc/init.d/tarantool
DAEMON=/usr/bin/tarantool_box
INSTANCES=`find $CONF_DIR -xtype f -name '*.cfg'`
-INSTSCRIPT=/usr/lib/tarantool/init_instance.sh
+INSTSCRIPT=/usr/sbin/tarantool_instance
# Exit if the package is not installed
[ -x "$DAEMON" ] || exit 0
@@ -0,0 +1,8 @@
+To create new instance You should:
+
+ 1. place instance_name.cfg into /etc/tarantool/instances.available/
+ 2. create symlink
+ /etc/tarantool/instances.available/instance_name.cfg ->
+ /etc/tarantool/instances.enabled/instance_name.cfg
+ 3. do invoke-rc.d tarantool restart
+

0 comments on commit 3aed694

Please sign in to comment.