Changeset 1399


Ignore:
Timestamp:
Oct 28, 2008, 10:53:29 PM (15 years ago)
Author:
broder
Message:

Cleanup invirt-vnc-server's init script to use /lib/init/std-init.sh

Location:
trunk/packages/invirt-vnc-server/debian
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/invirt-vnc-server/debian/changelog

    r1389 r1399  
     1invirt-vnc-server (0.0.2) unstable; urgency=low
     2
     3  * Cleanup the init script to use /lib/init/std-init.sh
     4
     5 -- Evan Broder <broder@mit.edu>  Tue, 28 Oct 2008 20:48:38 -0400
     6
    17invirt-vnc-server (0.0.1) unstable; urgency=low
    28
  • trunk/packages/invirt-vnc-server/debian/invirt-vnc-server.init

    r1386 r1399  
    1515
    1616# PATH should only include /usr/* if it runs after the mountnfs.sh script
    17 PATH=/sbin:/usr/sbin:/bin:/usr/bin
     17PACKAGE=invirt-vnc-server
    1818DESC="The Invirt VNC Proxy Server"
    19 NAME=invirt-vnc-server
    2019DAEMON=/usr/sbin/invirt-vnc-server
    2120DAEMON_ARGS=""
     
    2625[ -x "$DAEMON" ] || exit 0
    2726
    28 # Read configuration variable file if it is present
    29 [ -r /etc/default/$NAME ] && . /etc/default/$NAME
    30 
    31 # Load the VERBOSE setting and other rcS variables
    32 . /lib/init/vars.sh
    33 
    34 # Define LSB log_* functions.
    35 # Depend on lsb-base (>= 3.0-6) to ensure that this file is present.
    36 . /lib/lsb/init-functions
     27. /lib/init/std-init.sh
    3728
    3829#
     
    4637        #   2 if daemon could not be started
    4738        daemon --running -n $NAME && return 1
    48         daemon -r -U -D "$(dirname $DAEMON)" -O daemon.info -E daemon.err -n $NAME -U $DAEMON $DAEMON_ARGS || return 2
     39        daemon -r -U -O daemon.info -E daemon.err -n $NAME -U $DAEMON $DAEMON_ARGS || return 2
    4940}
    5041
     
    6758}
    6859
    69 case "$1" in
    70   start)
    71         [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME"
    72         do_start
    73         case "$?" in
    74                 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
    75                 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
    76         esac
    77         ;;
    78   stop)
    79         [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
    80         do_stop
    81         case "$?" in
    82                 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
    83                 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
    84         esac
    85         ;;
    86   #reload|force-reload)
    87         #
    88         # If do_reload() is not implemented then leave this commented out
    89         # and leave 'force-reload' as an alias for 'restart'.
    90         #
    91         #log_daemon_msg "Reloading $DESC" "$NAME"
    92         #do_reload
    93         #log_end_msg $?
    94         #;;
    95   restart|force-reload)
    96         #
    97         # If the "reload" option is implemented then remove the
    98         # 'force-reload' alias
    99         #
    100         log_daemon_msg "Restarting $DESC" "$NAME"
    101         do_stop
    102         case "$?" in
    103           0|1)
    104                 do_start
    105                 case "$?" in
    106                         0) log_end_msg 0 ;;
    107                         1) log_end_msg 1 ;; # Old process is still running
    108                         *) log_end_msg 1 ;; # Failed to start
    109                 esac
    110                 ;;
    111           *)
    112                 # Failed to stop
    113                 log_end_msg 1
    114                 ;;
    115         esac
    116         ;;
    117   *)
    118         #echo "Usage: $SCRIPTNAME {start|stop|restart|reload|force-reload}" >&2
    119         echo "Usage: $SCRIPTNAME {start|stop|restart|force-reload}" >&2
    120         exit 3
    121         ;;
    122 esac
    123 
    124 :
     60std_init "$1"
Note: See TracChangeset for help on using the changeset viewer.