Changeset dc2198d for debian


Ignore:
Timestamp:
Sep 6, 2011 12:39:30 PM (9 years ago)
Author:
kytv <kytv@…>
Branches:
master
Children:
1e5fe1f6
Parents:
19905e9
Message:

Debian: Add ability to dump threads to the initscript

File:
1 edited

Legend:

Unmodified
Added
Removed
  • debian/i2p.init

    r19905e9 rdc2198d  
    7878
    7979
    80 # is the wrapper from the service-wrapper package even installed? 
     80# is the wrapper from the service-wrapper package even installed?
    8181# if not, bail NOW
    8282
     
    9595        [ -r $PIDFILE ] || touch $PIDFILE
    9696        [ -r $JVMPIDFILE ] || touch $JVMPIDFILE
    97         [ -d $I2PTEMP ] || mkdir $I2PTEMP 
     97        [ -d $I2PTEMP ] || mkdir $I2PTEMP
    9898        chown -Rf $I2PUSER:$I2PUSER  $I2PTEMP/*i2p* $I2PTEMP/router.ping $RUN > /dev/null 2>&1
    9999        chown -f -R $I2PUSER:adm /var/log/$NAME
     
    116116}
    117117
     118do_dump()
     119{
     120        start-stop-daemon --stop --quiet -s 3 --pidfile $PIDFILE -u $I2PUSER
     121        RETVAL="$?"
     122        [ "$RETVAL" = 2 ] && return 2
     123}
    118124
    119125case "$1" in
     
    125131                2) log_end_msg 1 ;;
    126132        esac
    127         ;; 
     133        ;;
     134  dump)
     135        log_daemon_msg "Dumping $DESC" "$NAME"
     136        do_dump
     137        case "$?" in
     138                0|1) log_end_msg 0 ;;
     139                2) log_end_msg 1 ;;
     140        esac
     141        ;;
    128142  stop)
    129143        log_daemon_msg "Stopping $DESC" "$NAME"
     
    133147                2) log_end_msg 1 ;;
    134148        esac
    135         ;; 
     149        ;;
    136150  status)
    137151       status_of_proc -p $PIDFILE "$DAEMON" "$NAME" && exit 0 || exit $?
     
    157171*)
    158172        N=/etc/init.d/$NAME
    159         echo "Usage: $N {start|stop|status|restart|force-reload}" >&2
     173        echo "Usage: $N {start|stop|dump|status|restart|force-reload}" >&2
    160174        exit 3
    161175        ;;
Note: See TracChangeset for help on using the changeset viewer.