~upstart-devel/upstart/upstart-jobs

« back to all changes in this revision

Viewing changes to vivid/etc/init.d/refdb

  • Committer: Dimitri John Ledkov
  • Date: 2014-11-19 12:58:41 UTC
  • Revision ID: dimitri.j.ledkov@intel.com-20141119125841-98dr37roy8dvcv3b
auto update

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
#
 
3
# refdb: Start the refdb bibliography tool application server
 
4
#        (for use as init.d or rc.d script)
 
5
#
 
6
# markus@mhoenicka.de 2001-7-22
 
7
 
 
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.
 
12
  
 
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.
 
17
  
 
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/>
 
20
 
 
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
# *********************************
 
29
 
 
30
# the name of the application
 
31
NAME=refdb
 
32
 
 
33
# set some default path
 
34
PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin
 
35
 
 
36
# the full path to the binary that is to be started as a daemon
 
37
DAEMON=/usr/bin/refdbd
 
38
 
 
39
# the full path to the script that actually starts and stops the application
 
40
REFDBCTL=/usr/bin/refdbctl
 
41
 
 
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
 
46
BSDSTYLE=NO
 
47
 
 
48
# don't get interrupted
 
49
trap "" 1
 
50
 
 
51
# see whether all ingredients are available
 
52
test -f $DAEMON || exit 1
 
53
test -f $REFDBCTL || exit 1
 
54
 
 
55
# now run the specified command
 
56
case "$1" in
 
57
    start)
 
58
        if [ $BSDSTYLE = "YES" ]; then
 
59
            $REFDBCTL start > /dev/null && echo -n ' refdb'
 
60
        else
 
61
            echo "Starting bibliography tool application server: $NAME."
 
62
            $REFDBCTL start
 
63
        fi;;
 
64
    stop)
 
65
        if [ $BSDSTYLE = "YES" ]; then
 
66
            $REFDBCTL stop > /dev/null && echo -n ' refdb'
 
67
        else
 
68
            echo "Stopping bibliography tool application server: $NAME."
 
69
            $REFDBCTL stop
 
70
        fi;;
 
71
    restart)
 
72
        if [ $BSDSTYLE = "YES" ]; then
 
73
            $REFDBCTL restart > /dev/null && echo -n ' refdb'
 
74
        else
 
75
            echo "Restarting bibliography tool application server: $NAME."
 
76
            $REFDBCTL restart
 
77
        fi;;
 
78
    force-reload)
 
79
        if [ $BSDSTYLE = "YES" ]; then
 
80
            $REFDBCTL reload > /dev/null && echo -n ' refdb'
 
81
        else
 
82
            echo "Reloading bibliography tool application server: $NAME."
 
83
            $REFDBCTL reload
 
84
        fi;;
 
85
    *)
 
86
        echo "Usage: $(basename $0) {start|stop|restart|force-reload}" >&2
 
87
        exit 1;;
 
88
esac
 
89
 
 
90
exit 0