-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcouchdb-solr2-update
executable file
·41 lines (38 loc) · 1.19 KB
/
couchdb-solr2-update
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
#! /bin/sh -e
### BEGIN INIT INFO
# Provides: couchdb-solr2-update
# Required-Start: $remote_fs $net
# Required-Stop: $remote_fs $network
# Default-Start: 2 3 4 5
# Default-Stop: 0 1 6
# Short-Description: Start FTI updater for CouchDB
# Description: Start FTI updater for CouchDB database server
### END INIT INFO
# EDIT ME!
DAEMON=/usr/local/python/bin/couchdb-solr2-update
LOG=/usr/local/couchdb/var/log/couchdb/update.log
USER=couchdb
PID=/usr/local/couchdb/var/run/couchdb-solr2-update.pid
CONFIG=/usr/local/couchdb/etc/couchdb/couchdb-solr2-update.ini
NAME=couchdb-solr2-update
case "$1" in
start)
echo -n "Starting $NAME: "
start-stop-daemon --start --chuid $USER --pidfile $PID --startas $DAEMON -- -l $LOG -p $PID -a $CONFIG
echo $NAME
;;
stop)
echo -n "Stop $NAME: "
start-stop-daemon --stop --pidfile $PID
echo $NAME
;;
restart|force-reload)
echo -n "Restarting $NAME: "
start-stop-daemon --stop --pidfile $PID --oknodo
start-stop-daemon --start --chuid $USER --pidfile $PID --startas $DAEMON -- -l $LOG -p $PID -a $CONFIG
echo $NAME
;;
*)
echo "Usage: $0 {start|stop|restart|force-reload}" >&2
exit 1
esac