Author: kilo Date: 2008-03-25 03:15:24 -0500 (Tue, 25 Mar 2008) New Revision: 9863
Modified: trunk/gnue-appserver/packaging/debian/gnue-appserver.init Log: Fixed typo. Patch by Aaron S. Hawley Modified: trunk/gnue-appserver/packaging/debian/gnue-appserver.init =================================================================== --- trunk/gnue-appserver/packaging/debian/gnue-appserver.init 2008-03-22 17:15:40 UTC (rev 9862) +++ trunk/gnue-appserver/packaging/debian/gnue-appserver.init 2008-03-25 08:15:24 UTC (rev 9863) @@ -12,7 +12,7 @@ # Author: GNU Enterprise Team ([EMAIL PROTECTED]) PATH=/sbin:/usr/sbin:/bin:/usr/bin -DESC="GNU Enterprise Applicataion Server" +DESC="GNU Enterprise Application Server" NAME=gnue-appserver DAEMON=/usr/bin/$NAME DAEMON_ARGS="--silent" @@ -38,13 +38,13 @@ # do_start() { - # Return - # 0 if daemon has been started - # 1 if daemon was already running - # 2 if daemon could not be started - start-stop-daemon --start --quiet --user $USER --pidfile $PIDFILE \ + # Return + # 0 if daemon has been started + # 1 if daemon was already running + # 2 if daemon could not be started + start-stop-daemon --start --quiet --user $USER --pidfile $PIDFILE \ --startas $DAEMON --test > /dev/null || return 1 - start-stop-daemon --start --quiet --chuid $USER --pidfile $PIDFILE \ + start-stop-daemon --start --quiet --chuid $USER --pidfile $PIDFILE \ --startas $DAEMON -- $DAEMON_ARGS || return 2 } @@ -53,65 +53,65 @@ # do_stop() { - start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 \ + start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 \ --user $USER --pidfile $PIDFILE - RETVAL="$?" - [ "$RETVAL" = 2 ] && return 2 - # Many daemons don't delete their pidfiles when they exit. - rm -f $PIDFILE - return "$RETVAL" + RETVAL="$?" + [ "$RETVAL" = 2 ] && return 2 + # Many daemons don't delete their pidfiles when they exit. + rm -f $PIDFILE + return "$RETVAL" } # # Function that sends a SIGHUP to the daemon/service # do_reload() { - start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE - return 0 + start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE + return 0 } case "$1" in start) - [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" - do_start - case "$?" in - 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 || exit 0;; - 2) [ "$VERBOSE" != no ] && log_end_msg 1 || exit 1;; - esac - ;; + [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" + do_start + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 || exit 0;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 || exit 1;; + esac + ;; stop) - [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" - do_stop - case "$?" in - 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 || exit 0;; - 2) [ "$VERBOSE" != no ] && log_end_msg 1 || exit 1;; - esac - ;; + [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" + do_stop + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 || exit 0;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 || exit 1;; + esac + ;; reload|force-reload) - log_daemon_msg "Reloading $DESC" "$NAME" - do_reload - log_end_msg $? - ;; + log_daemon_msg "Reloading $DESC" "$NAME" + do_reload + log_end_msg $? + ;; restart) - log_daemon_msg "Restarting $DESC" "$NAME" - do_stop - case "$?" in - 0|1) - do_start - case "$?" in - 0) log_end_msg 0 ;; - 1) log_end_msg 1 ;; # Old process is still running - *) log_end_msg 1 ;; # Failed to start - esac - ;; - *) - # Failed to stop - log_end_msg 1 - ;; - esac - ;; + log_daemon_msg "Restarting $DESC" "$NAME" + do_stop + case "$?" in + 0|1) + do_start + case "$?" in + 0) log_end_msg 0 ;; + 1) log_end_msg 1 ;; # Old process is still running + *) log_end_msg 1 ;; # Failed to start + esac + ;; + *) + # Failed to stop + log_end_msg 1 + ;; + esac + ;; *) - echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 - exit 3 - ;; + echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2 + exit 3 + ;; esac _______________________________________________ commit-gnue mailing list commit-gnue@gnu.org http://lists.gnu.org/mailman/listinfo/commit-gnue