Commit e173753f authored by dgt's avatar dgt

Merge branch 'scripts' into 'master'

feature: script/thinking_sphinx to use with systemd

See merge request !235
parents bb6ca315 3032643b
#!/usr/bin/env ruby
# This command will automatically be run when you run "rails" with Rails 3 gems installed from the root of your application.
APP_PATH = File.expand_path('../../config/application', __FILE__)
require File.expand_path('../../config/boot', __FILE__)
require 'rails/commands'
#!/usr/bin/env bash
# exit if any of the commands has a non zero return code
set -o errexit
# err out if trying to use undefined variables
set -o nounset
# enable to see each command that is being called
# set -o xtrace
dir="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
rake="${dir}/../bin/rake"
if [ "${1:-}" = "status" ]
then
${rake} ts:${1} | grep 'is currently running'
exit
fi
if [ "${1:-}" = "start" ] \
|| [ "${1:-}" = "stop" ] \
|| [ "${1:-}" = "restart" ]
then
${rake} ts:${1}
exit
fi
echo "${0} <command>"
echo "commands: [status|start|stop|restart]"
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment