Changeset 469

Show
Ignore:
Timestamp:
05/14/04 19:21:16 (5 years ago)
Author:
morris
Message:

add register and index commands

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • wired/trunk/wired/wiredctl.in

    r455 r469  
    8787                else 
    8888                        echo "$PROG: $DO: wired could not be reloaded" 
     89                fi 
     90                ;; 
     91 
     92        register) 
     93                if [ $RUNNING -eq 0 ]; then 
     94                        echo "$PROG: $DO: wired is not running" 
     95                        exit 
     96                fi 
     97 
     98                if kill -USR1 $PID; then 
     99                        echo "$PROG: $DO: wired registered" 
     100                else 
     101                        echo "$PROG: $DO: wired could not be registered" 
     102                fi 
     103                ;; 
     104 
     105        index) 
     106                if [ $RUNNING -eq 0 ]; then 
     107                        echo "$PROG: $DO: wired is not running" 
     108                        exit 
     109                fi 
     110 
     111                if kill -USR2 $PID; then 
     112                        echo "$PROG: $DO: wired indexed" 
     113                else 
     114                        echo "$PROG: $DO: wired could not be indexed" 
    89115                fi 
    90116                ;; 
     
    184210         
    185211        *) 
    186                 echo "Usage: $PROG [start | stop | restart | reload | config | configtest | status | help]" 
    187212                cat <<EOF 
     213Usage: wiredctl [start | stop | restart | reload | register | index | config | configtest | status | help] 
    188214 
    189215    start       start wired 
     
    191217    restart     restart wired 
    192218    reload      send wired a SIGHUP, causing it to reload its configuration 
     219    register    send wired a SIGUSR1, causing it to re-register with the tracker 
     220    index       send wired a SIGUSR2, causing it to re-index the files 
    193221    config      show the configuration 
    194222    configtest  run a configuration syntax test