Lines 18-34
Link Here
|
18 |
# PATH should only include /usr/* if it runs after the mountnfs.sh script |
18 |
# PATH should only include /usr/* if it runs after the mountnfs.sh script |
19 |
PATH=/sbin:/usr/sbin:/bin:/usr/bin |
19 |
PATH=/sbin:/usr/sbin:/bin:/usr/bin |
20 |
DESC="Koha ILS" |
20 |
DESC="Koha ILS" |
21 |
NAME=daemonexecutablename |
21 |
NAME="koha-common" |
22 |
DAEMON=/usr/sbin/$NAME |
|
|
23 |
DAEMON_ARGS="--options args" |
24 |
PIDFILE=/var/run/$NAME.pid |
25 |
SCRIPTNAME=/etc/init.d/$NAME |
22 |
SCRIPTNAME=/etc/init.d/$NAME |
26 |
|
23 |
|
27 |
# Exit if the package is not installed |
24 |
# Exit if the package is not installed |
28 |
[ -x /usr/sbin/koha-start-zebra ] || exit 0 |
25 |
[ -x /usr/sbin/koha-start-zebra ] || exit 0 |
29 |
|
26 |
|
30 |
# Read configuration variable file if it is present |
27 |
# Read configuration variable file if it is present |
31 |
# [ -r /etc/default/$NAME ] && . /etc/default/$NAME |
28 |
[ -r /etc/default/$NAME ] && . /etc/default/$NAME |
32 |
|
29 |
|
33 |
# Load the VERBOSE setting and other rcS variables |
30 |
# Load the VERBOSE setting and other rcS variables |
34 |
. /lib/init/vars.sh |
31 |
. /lib/init/vars.sh |
Lines 46-51
do_start()
Link Here
|
46 |
koha-create-dirs $(koha-list) |
43 |
koha-create-dirs $(koha-list) |
47 |
koha-start-zebra $(koha-list --enabled) |
44 |
koha-start-zebra $(koha-list --enabled) |
48 |
koha-start-sip $(koha-list --enabled) |
45 |
koha-start-sip $(koha-list --enabled) |
|
|
46 |
|
47 |
if [ "$USE_INDEXER_DAEMON" = "yes" ]; then |
48 |
koha-start-indexer $(koha-list --enabled) |
49 |
fi |
49 |
} |
50 |
} |
50 |
|
51 |
|
51 |
# |
52 |
# |
Lines 56-61
do_stop()
Link Here
|
56 |
# We stop everything, including disabled ones. |
57 |
# We stop everything, including disabled ones. |
57 |
koha-stop-zebra $(koha-list) || true |
58 |
koha-stop-zebra $(koha-list) || true |
58 |
koha-stop-sip $(koha-list) || true |
59 |
koha-stop-sip $(koha-list) || true |
|
|
60 |
|
61 |
if [ "$USE_INDEXER_DAEMON" = "yes" ]; then |
62 |
koha-stop-indexer $(koha-list --enabled) |
63 |
fi |
59 |
} |
64 |
} |
60 |
|
65 |
|
61 |
# |
66 |
# |
Lines 65-70
do_reload() {
Link Here
|
65 |
koha-restart-zebra $(koha-list --enabled) |
70 |
koha-restart-zebra $(koha-list --enabled) |
66 |
koha-stop-sip $(koha-list) || true |
71 |
koha-stop-sip $(koha-list) || true |
67 |
koha-start-sip $(koha-list --enabled) |
72 |
koha-start-sip $(koha-list --enabled) |
|
|
73 |
|
74 |
if [ "$USE_INDEXER_DAEMON" = "yes" ]; then |
75 |
koha-restart-indexer $(koha-list --enabled) |
76 |
fi |
68 |
} |
77 |
} |
69 |
|
78 |
|
70 |
case "$1" in |
79 |
case "$1" in |
Lines 84-101
case "$1" in
Link Here
|
84 |
*) [ "$VERBOSE" != no ] && log_end_msg 1 ;; |
93 |
*) [ "$VERBOSE" != no ] && log_end_msg 1 ;; |
85 |
esac |
94 |
esac |
86 |
;; |
95 |
;; |
87 |
# status) |
|
|
88 |
# status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $? |
89 |
# ;; |
90 |
#reload|force-reload) |
91 |
# |
92 |
# If do_reload() is not implemented then leave this commented out |
93 |
# and leave 'force-reload' as an alias for 'restart'. |
94 |
# |
95 |
#log_daemon_msg "Reloading $DESC" "$NAME" |
96 |
#do_reload |
97 |
#log_end_msg $? |
98 |
#;; |
99 |
restart|force-reload) |
96 |
restart|force-reload) |
100 |
# |
97 |
# |
101 |
# If the "reload" option is implemented then remove the |
98 |
# If the "reload" option is implemented then remove the |
Lines 119-125
case "$1" in
Link Here
|
119 |
;; |
116 |
;; |
120 |
*) |
117 |
*) |
121 |
echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 |
118 |
echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 |
122 |
#echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 |
|
|
123 |
exit 3 |
119 |
exit 3 |
124 |
;; |
120 |
;; |
125 |
esac |
121 |
esac |