updated on Thu Jan 19 04:14:35 UTC 2012
[aur-mirror.git] / gitorious-git / gitorious-ultrasphinx.rc.d
blobdd2b36407d6717ec3ad69606368bdf3c1c0f4a87
1 #!/bin/bash
3 . /etc/rc.conf
4 . /etc/rc.d/functions
6 case "$1" in
7 start)
8 stat_busy "Starting gitorious ultrasphinx"
9 /bin/su - git -c "bin/rake ultrasphinx:daemon:start RAILS_ENV=production"
10 if [ $? -gt 0 ]; then
11 stat_fail
12 else
13 add_daemon gitorious-ultrasphinx
14 stat_done
17 stop)
18 stat_busy "Stopping gitorious ultrasphinx"
19 /bin/su - git -c "bin/rake ultrasphinx:daemon:stop RAILS_ENV=production"
20 if [ $? -gt 0 ]; then
21 stat_fail
22 else
23 rm_daemon git-daemon
24 stat_done
27 status)
28 /bin/su - git -c "bin/rake ultrasphinx:daemon:start RAILS_ENV=production"
30 restart)
31 stat_busy "Restarting gitorious ultrasphinx"
32 /bin/su - git -c "bin/rake ultrasphinx:daemon:restart RAILS_ENV=production"
33 if [ $? -gt 0 ]; then
34 stat_fail
35 rm_daemon gitorious-ultrasphinx
36 else
37 add_daemon gitorious-ultrasphinx
38 stat_done
42 echo "usage: $0 {start|stop|status|restart}"
43 esac
44 exit 0