Changes between Version 7 and Version 8 of UserGuide/Service


Ignore:
Timestamp:
03/22/2010 08:32:22 PM (14 years ago)
Author:
jferrandis
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • UserGuide/Service

    v7 v8  
    419419 
    420420{{{ 
    421 #!sh 
    422421#! /bin/sh 
    423422# Copyright (c) 1995-2000 SuSE GmbH Nuernberg, Germany. 
     
    441440# Default-Stop: 0 1 2 6 
    442441# Short-Description: Daemonized version of deluge. 
    443 # Description:       Starts the deluge daemon. 
     442# Description:       Starts the deluge daemon with the user deluged 
    444443 
    445444### END INIT INFO 
    446445 
    447446DELUGED_BIN=/usr/bin/deluged 
     447 
    448448test -x $DELUGED_BIN || exit 5 
    449449 
    450 DELUGED_USER=""        # CHANGE THIS 
    451 test -z "$DELUGED_USER" || exit 6 
    452  
    453 DELUGED_PIDFILE=/var/run/deluged.pid 
    454  
    455 DELUGED_ARGS="-P $DELUGED_PIDFILE"      # consult man deluged for more options 
     450DELUGED_USER="deluge"        # CHANGE THIS 
     451test -n "$DELUGED_USER" || exit 6 
     452 
     453DELUGED_ARGS="-P /.config/deluge/deluged.pid -c /.config/deluge/ -l /.config/deluge/deluged.log" # consult man deluged for more options 
    456454 
    457455. /etc/rc.status 
     
    472470    start) 
    473471         
    474    echo -n "Starting DELUGE daemon" 
    475    ## Start daemon with startproc(8). If this fails 
    476    ## the echo return value is set appropriate. 
    477  
    478    startproc -f -u $DELUGED_USER $DELUGED_BIN $DELUGED_ARGS 
    479  
    480    # Remember status and be verbose 
    481    rc_status -v 
    482    ;; 
     472        echo -n "Starting DELUGE daemon" 
     473        ## Start daemon with startproc(8). If this fails 
     474        ## the echo return value is set appropriate. 
     475 
     476        startproc -f -u $DELUGED_USER $DELUGED_BIN $DELUGED_ARGS 
     477 
     478        # Remember status and be verbose 
     479        rc_status -v 
     480        ;; 
    483481    stop) 
    484    echo -n "Shutting down DELUGE daemon" 
    485    ## Stop daemon with killproc(8) and if this fails 
    486    ## set echo the echo return value. 
    487  
    488    killproc -TERM $DELUGED_BIN 
    489  
    490    # Remember status and be verbose 
    491    rc_status -v 
    492    ;; 
     482        echo -n "Shutting down DELUGE daemon" 
     483        ## Stop daemon with killproc(8) and if this fails 
     484        ## set echo the echo return value. 
     485 
     486        killproc -TERM $DELUGED_BIN 
     487 
     488        # Remember status and be verbose 
     489        rc_status -v 
     490        ;; 
    493491    try-restart) 
    494492        ## Stop the service and if this succeeds (i.e. the  
     
    509507        ;; 
    510508    force-reload|reload) 
    511    ## Signal the daemon to reload its config. Most daemons 
    512    ## do this on signal 1 (SIGHUP). 
    513  
    514    echo -n "Reload service DELUGED" 
    515  
    516    killproc -HUP $DELUGED_BIN 
     509        ## Signal the daemon to reload its config. Most daemons 
     510        ## do this on signal 1 (SIGHUP). 
     511 
     512        echo -n "Reload service DELUGED" 
     513 
     514        killproc -HUP $DELUGED_BIN 
    517515 
    518516        rc_status -v 
     
    520518        ;; 
    521519    status) 
    522    echo -n "Checking for service DELUGED " 
     520        echo -n "Checking for service DELUGED " 
    523521        ## Check status with checkproc(8), if process is running 
    524522        ## checkproc will return with exit status 0. 
     
    530528        # 3 - service not running 
    531529 
    532    checkproc $DELUGED_BIN 
    533  
    534    rc_status -v 
    535    ;; 
     530        checkproc $DELUGED_BIN 
     531 
     532        rc_status -v 
     533        ;; 
    536534    probe) 
    537    ## Optional: Probe for the necessity of a reload, 
    538    ## give out the argument which is required for a reload. 
    539  
    540         #test /etc/ssh/sshd_config -nt $SSHD_PIDFILE && echo reload 
    541    ;; 
     535        ## Optional: Probe for the necessity of a reload, 
     536        ## give out the argument which is required for a reload. 
     537 
     538        ;; 
    542539    *) 
    543    echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}" 
    544    exit 1 
    545    ;; 
     540        echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}" 
     541        exit 1 
     542        ;; 
    546543esac 
    547544rc_exit 
     
    551548 
    552549{{{ 
    553 #!sh 
    554550#! /bin/sh 
    555551# Copyright (c) 1995-2000 SuSE GmbH Nuernberg, Germany. 
     
    573569# Default-Stop: 0 1 2 6 
    574570# Short-Description: Daemonized version of deluge-web. 
    575 # Description:       Starts the deluge-web daemon. 
     571# Description:       Starts the deluge-web daemon with the user specified in 
     572#                    /home/jose/.config/deluge/web.conf 
    576573 
    577574### END INIT INFO 
     
    580577test -x $DELUGED_WEB_BIN || exit 5 
    581578 
    582 DELUGED_WEB_USER=""       # CHANGE THIS 
    583 test -z "$DELUGED_WEB_USER" || exit 6 
    584  
    585 DELUGED_WEB_PIDFILE=/var/run/deluge-web.pid 
    586  
    587 DELUGED_WEB_ARGS=""       # consult man deluge-web for options 
     579DELUGED_WEB_USER="deluge" 
    588580 
    589581. /etc/rc.status 
     
    604596    start) 
    605597         
    606    echo -n "Starting DELUGE-WEB daemon" 
    607    ## Start daemon with startproc(8). If this fails 
    608    ## the echo return value is set appropriate. 
    609  
    610    startproc -f -u $DELUGED_WEB_USER $DELUGED_WEB_BIN $DELUGED_WEB_ARGS 
    611  
    612    # Remember status and be verbose 
    613    rc_status -v 
    614    ;; 
     598        echo -n "Starting DELUGE-WEB daemon" 
     599        ## Start daemon with startproc(8). If this fails 
     600        ## the echo return value is set appropriate. 
     601 
     602        startproc -f -u $DELUGED_WEB_USER $DELUGED_WEB_BIN 
     603 
     604        # Remember status and be verbose 
     605        rc_status -v 
     606        ;; 
    615607    stop) 
    616    echo -n "Shutting down DELUGE-WEB daemon" 
    617    ## Stop daemon with killproc(8) and if this fails 
    618    ## set echo the echo return value. 
    619  
    620    killproc -TERM $DELUGED_WEB_BIN 
    621  
    622    # Remember status and be verbose 
    623    rc_status -v 
    624    ;; 
     608        echo -n "Shutting down DELUGE-WEB daemon" 
     609        ## Stop daemon with killproc(8) and if this fails 
     610        ## set echo the echo return value. 
     611 
     612        killproc -TERM $DELUGED_WEB_BIN 
     613 
     614        # Remember status and be verbose 
     615        rc_status -v 
     616        ;; 
    625617    try-restart) 
    626618        ## Stop the service and if this succeeds (i.e. the  
     
    641633        ;; 
    642634    force-reload|reload) 
    643    ## Signal the daemon to reload its config. Most daemons 
    644    ## do this on signal 1 (SIGHUP). 
    645  
    646    echo -n "Reload service DELUGED_WEB" 
    647  
    648    killproc -HUP $DELUGED_WEB_BIN 
     635        ## Signal the daemon to reload its config. Most daemons 
     636        ## do this on signal 1 (SIGHUP). 
     637 
     638        echo -n "Reload service DELUGED_WEB" 
     639 
     640        killproc -HUP $DELUGED_WEB_BIN 
    649641 
    650642        rc_status -v 
     
    652644        ;; 
    653645    status) 
    654    echo -n "Checking for service DELUGED_WEB " 
     646        echo -n "Checking for service DELUGED_WEB " 
    655647        ## Check status with checkproc(8), if process is running 
    656648        ## checkproc will return with exit status 0. 
     
    662654        # 3 - service not running 
    663655 
    664    checkproc $DELUGED_WEB_BIN 
    665  
    666    rc_status -v 
    667    ;; 
     656        checkproc $DELUGED_WEB_BIN 
     657 
     658        rc_status -v 
     659        ;; 
    668660    probe) 
    669    ## Optional: Probe for the necessity of a reload, 
    670    ## give out the argument which is required for a reload. 
    671  
    672         #test /etc/ssh/sshd_config -nt $SSHD_PIDFILE && echo reload 
    673    ;; 
     661        ## Optional: Probe for the necessity of a reload, 
     662        ## give out the argument which is required for a reload. 
     663 
     664        ;; 
    674665    *) 
    675    echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}" 
    676    exit 1 
    677    ;; 
     666        echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}" 
     667        exit 1 
     668        ;; 
    678669esac 
    679670rc_exit