Added some reprap packages
[mirrors/ArchLinux-Packages.git] / riak / riak.rc
CommitLineData
209feeb0
H
1#!/bin/bash
2daemon_name=riak
3riak_bin='/usr/bin/riak';
4
5. /etc/rc.conf
6. /etc/rc.d/functions
7
8case "$1" in
9 console|attach|'')
10 "$riak_bin" $@;
11 exit $?;
12 ;;
13esac
14
15stat_busy "$1""ing $daemon_name daemon"
16
17err=$("$riak_bin" $@ 2>&1); ret=$?;
18echo "$err" | egrep -i '(not responding|already running)' >/dev/null && ret=10;
19
20[ $ret -gt 0 ] && {
21 stat_fail;
22 echo "$err";
23 exit 1;
24}
25
26case "$1" in
27 start|restart)
28 add_daemon $daemon_name
29 ;;
30 stop)
31 rm_daemon $daemon_name
32 ;;
33esac
34
35stat_done;
36echo "$err";
37exit 0;
This page took 0.13579 seconds and 4 git commands to generate.