11#! /bin/sh
22# ## BEGIN INIT INFO
33# Provides: geoknow-generator-ui
4- # Required-Start: $network $local_fs
5- # Required-Stop:
4+ # Required-Start: $local_fs $ network $remote_fs $syslog
5+ # Required-Stop: $local_fs $network $remote_fs $syslog
66# Default-Start: 2 3 4 5
77# Default-Stop: 0 1 6
88# Short-Description: <Enter a short description of the software>
1111# <...>
1212# ## END INIT INFO
1313
14- # Author: Vadim Zaslawski <[email protected] >14+ # Author: Alejandra Garcia-Rojas M <[email protected] >15+
16+ # Do NOT "set -e"
1517
1618# PATH should only include /usr/* if it runs after the mountnfs.sh script
1719PATH=/sbin:/usr/sbin:/bin:/usr/bin
18- DESC=geoknow-generator-ui # Introduce a short description here
19- NAME=geoknow-generator-ui # Introduce the short server's name here
20- DAEMON=/usr/sbin/geoknow-generator-ui # Introduce the server's location here
21- DAEMON_ARGS=" " # Arguments to run the daemon with
20+ DESC=" geoknow-generator-ui"
21+ NAME=geoknow-generator-ui
22+ DAEMON=/usr/sbin/geoknow-generator-ui
23+ DAEMON_ARGS=" "
2224PIDFILE=/var/run/$NAME .pid
2325SCRIPTNAME=/etc/init.d/$NAME
2426
2527# Exit if the package is not installed
26- [ -x $DAEMON ] || exit 0
28+ [ -x " $DAEMON " ] || exit 0
2729
2830# Read configuration variable file if it is present
2931[ -r /etc/default/$NAME ] && . /etc/default/$NAME
@@ -32,7 +34,8 @@ SCRIPTNAME=/etc/init.d/$NAME
3234. /lib/init/vars.sh
3335
3436# Define LSB log_* functions.
35- # Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
37+ # Depend on lsb-base (>= 3.2-14) to ensure that this file is present
38+ # and status_of_proc is working.
3639. /lib/lsb/init-functions
3740
3841#
@@ -104,13 +107,13 @@ do_reload() {
104107
105108case " $1 " in
106109 start)
107- [ " $VERBOSE " != no ] && log_daemon_msg " Starting $DESC " " $NAME "
108- do_start
109- case " $? " in
110+ [ " $VERBOSE " != no ] && log_daemon_msg " Starting $DESC " " $NAME "
111+ do_start
112+ case " $? " in
110113 0|1) [ " $VERBOSE " != no ] && log_end_msg 0 ;;
111114 2) [ " $VERBOSE " != no ] && log_end_msg 1 ;;
112115 esac
113- ;;
116+ ;;
114117 stop)
115118 [ " $VERBOSE " != no ] && log_daemon_msg " Stopping $DESC " " $NAME "
116119 do_stop
@@ -120,8 +123,8 @@ case "$1" in
120123 esac
121124 ;;
122125 status)
123- status_of_proc " $DAEMON " " $NAME " && exit 0 || exit $?
124- ;;
126+ status_of_proc " $DAEMON " " $NAME " && exit 0 || exit $?
127+ ;;
125128 # reload|force-reload)
126129 #
127130 # If do_reload() is not implemented then leave this commented out
@@ -148,7 +151,7 @@ case "$1" in
148151 esac
149152 ;;
150153 * )
151- # Failed to stop
154+ # Failed to stop
152155 log_end_msg 1
153156 ;;
154157 esac
0 commit comments