3
# refdb: Start the refdb bibliography tool application server
4
# (for use as init.d or rc.d script)
6
# markus@mhoenicka.de 2001-7-22
8
# This program is free software; you can redistribute it and/or modify
9
# it under the terms of the GNU General Public License as published by
10
# the Free Software Foundation; either version 2 of the License, or
11
# (at your option) any later version.
13
# This program is distributed in the hope that it will be useful,
14
# but WITHOUT ANY WARRANTY; without even the implied warranty of
15
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16
# GNU General Public License for more details.
18
# You should have received a copy of the GNU General Public License
19
# along with this program; if not, see <http://www.gnu.org/licenses/>
21
# ***********IMPORTANT*************
22
# This file is configured for SysV-style systems (most Linux distributions and
23
# a few commercial Unices). If you want to use the script on a BSD-style
24
# system (Slackware, {Free|Net|Open}BSD and a few commercial Unices), these
25
# two changes are recommended:
26
# 1. Set the value of BSDSTYLE to "YES" a few lines below
27
# 2. Rename the file to refdb.sh
28
# *********************************
30
# the name of the application
33
# set some default path
34
PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin
36
# the full path to the binary that is to be started as a daemon
37
DAEMON=/usr/bin/refdbd
39
# the full path to the script that actually starts and stops the application
40
REFDBCTL=/usr/bin/refdbctl
42
# set to 'YES' if the OS uses a BSD-style daemon startup system (this is
43
# true for BSD-UNIX and Unices derived thereof, as well as for the
44
# Slackware Linux distribution). This setting does not perform any black
45
# magic, but it makes the screen messages at startup match the OS style
48
# don't get interrupted
51
# see whether all ingredients are available
52
test -f $DAEMON || exit 1
53
test -f $REFDBCTL || exit 1
55
# now run the specified command
58
if [ $BSDSTYLE = "YES" ]; then
59
$REFDBCTL start > /dev/null && echo -n ' refdb'
61
echo "Starting bibliography tool application server: $NAME."
65
if [ $BSDSTYLE = "YES" ]; then
66
$REFDBCTL stop > /dev/null && echo -n ' refdb'
68
echo "Stopping bibliography tool application server: $NAME."
72
if [ $BSDSTYLE = "YES" ]; then
73
$REFDBCTL restart > /dev/null && echo -n ' refdb'
75
echo "Restarting bibliography tool application server: $NAME."
79
if [ $BSDSTYLE = "YES" ]; then
80
$REFDBCTL reload > /dev/null && echo -n ' refdb'
82
echo "Reloading bibliography tool application server: $NAME."
86
echo "Usage: $(basename $0) {start|stop|restart|force-reload}" >&2