Ignore:
Timestamp:
Jan 8, 2012 2:55:10 PM (8 years ago)
Author:
zzz <zzz@…>
Branches:
master
Children:
7feaadb
Parents:
43ec87e (diff), 59bd51a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

propagate from branch 'i2p.i2p' (head b7ee04ecc7a594239e977b25a52ebdabadce558e)

to branch 'i2p.i2p.zzz.jetty6' (head 2cd4a4dae8b87b9ed2128d83aff1b39e3a818556)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • installer/resources/i2prouter

    r43ec87e r69bbb88  
    358358    OS_VER=`sw_vers | grep 'ProductVersion:' | grep -o '[0-9]*\.[0-9]*\.[0-9]*'`
    359359    DIST_ARCH="universal"
    360     DIST_BITS="64"
     360    if [ $(sysctl -n hw.cpu64bit_capable) -eq 1 ]; then
     361        DIST_BITS="64"
     362    else
     363        DIST_BITS="32"
     364    fi
    361365    APP_PLIST_BASE=${PLIST_DOMAIN}.${APP_NAME}
    362366    APP_PLIST=${APP_PLIST_BASE}.plist
     
    10091013}
    10101014
     1015
    10111016stopit() {
    10121017    # $1 exit if down flag
     
    10251030        then
    10261031            # Running so try to stop it.
    1027             kill $pid
     1032            kill -TERM $pid
    10281033            if [ $? -ne 0 ]
    10291034            then
     
    10731078        else
    10741079            eval echo `gettext 'Stopped $APP_LONG_NAME.'`
     1080        fi
     1081    fi
     1082}
     1083
     1084graceful() {
     1085    # $1 exit if down flag
     1086
     1087    eval echo `gettext 'Stopping $APP_LONG_NAME gracefully...'`
     1088    getpid
     1089    if [ "X$pid" = "X" ]
     1090    then
     1091        eval echo `gettext '$APP_LONG_NAME was not running.'`
     1092        if [ "X$1" = "X1" ]
     1093        then
     1094            exit 1
     1095        fi
     1096    else
     1097        if [ "X$IGNORE_SIGNALS" = "X" ]
     1098        then
     1099            # Running so try to stop it.
     1100            # This sends HUP. router.gracefulHUP must be set in router.config,
     1101            # or else this will do the same as stop.
     1102            kill $pid
     1103            if [ $? -ne 0 ]
     1104            then
     1105                # An explanation for the failure should have been given
     1106                eval echo `gettext 'Unable to stop $APP_LONG_NAME.'`
     1107                exit 1
     1108            fi
     1109        else
     1110            rm -f "$ANCHORFILE"
     1111            if [ -f "$ANCHORFILE" ]
     1112            then
     1113                # An explanation for the failure should have been given
     1114                eval echo `gettext 'Unable to stop $APP_LONG_NAME.'`
     1115                exit 1
     1116            fi
    10751117        fi
    10761118    fi
     
    15541596            echo "`gettext '  start        Start in the background as a daemon process.'`"
    15551597            echo "`gettext '  stop         Stop if running as a daemon or in another console.'`"
     1598            echo "`gettext '  graceful     Stop gracefully, may take up to 11 minutes.'`"
    15561599            echo "`gettext '  restart      Stop if running and then start.'`"
    15571600            echo "`gettext '  condrestart  Restart only if already running.'`"
     
    16211664            ;;
    16221665
     1666        'graceful')
     1667            checkUser "" "$COMMAND"
     1668            graceful "0"
     1669            ;;
     1670
    16231671        'restart')
    16241672            checkUser touchlock "$COMMAND"
Note: See TracChangeset for help on using the changeset viewer.