Changeset 8397296 for debian


Ignore:
Timestamp:
May 6, 2012 10:35:59 AM (8 years ago)
Author:
kytv <kytv@…>
Branches:
master
Children:
81d9e2f1
Parents:
06d0412
Message:

Add 'graceful' / comment out stanza not needed on Ubuntu

File:
1 edited

Legend:

Unmodified
Added
Removed
  • debian/i2p.init

    r06d0412 r8397296  
    5656     [ -n "$value" ] && eval export $var=$value
    5757
    58      if [ -n "$value" ] && [ "$ENV_FILE" = /etc/environment ]; then
    59          log_warning_msg "/etc/environment has been deprecated for locale information; use /etc/default/locale for $var=$value instead"
    60      fi
     58# This is commented out for Ubuntu: Ubuntu still creates
     59# /etc/environment in the most recent release
     60# (currently 'Precise').
     61#
     62# TODO Add logic to automatically handle this
     63#
     64# Commented for Ubuntu since PPA packages 0.9-1$DISTRO1.
     65# Packages for Debian systems will have this stanza uncommented.
     66#
     67#     if [ -n "$value" ] && [ "$ENV_FILE" = /etc/environment ]; then
     68#         log_warning_msg "/etc/environment has been deprecated for locale information; use /etc/default/locale for $var=$value instead"
     69#     fi
     70
    6171 done
    6272done
     
    125135}
    126136
     137do_graceful()
     138{
     139    start-stop-daemon --stop --quiet -s HUP --pidfile $PIDFILE -u $I2PUSER
     140    [ "$RETVAL" = 2 ] && return 2
     141}
     142
    127143case "$1" in
    128144  start)
     
    137153        log_daemon_msg "Dumping $DESC" "$NAME"
    138154        do_dump
     155        case "$?" in
     156                0|1) log_end_msg 0 ;;
     157                2) log_end_msg 1 ;;
     158        esac
     159        ;;
     160  graceful)
     161        log_daemon_msg "Attempting graceful shutdown of $DESC" "$NAME"
     162        log_daemon_msg "(could take up to 11 minutes)"
     163        do_graceful
    139164        case "$?" in
    140165                0|1) log_end_msg 0 ;;
     
    173198*)
    174199    N=/etc/init.d/$NAME
    175     echo "Usage: $N {start|stop|dump|status|restart|force-reload}" >&2
     200    echo "Usage: $N {start|stop|dump|graceful|status|restart|force-reload}" >&2
    176201    exit 3
    177202    ;;
Note: See TracChangeset for help on using the changeset viewer.