Changes between Version 7 and Version 8 of UserGuide/Service
- Timestamp:
- 03/22/2010 08:32:22 PM (14 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
UserGuide/Service
v7 v8 419 419 420 420 {{{ 421 #!sh422 421 #! /bin/sh 423 422 # Copyright (c) 1995-2000 SuSE GmbH Nuernberg, Germany. … … 441 440 # Default-Stop: 0 1 2 6 442 441 # Short-Description: Daemonized version of deluge. 443 # Description: Starts the deluge daemon .442 # Description: Starts the deluge daemon with the user deluged 444 443 445 444 ### END INIT INFO 446 445 447 446 DELUGED_BIN=/usr/bin/deluged 447 448 448 test -x $DELUGED_BIN || exit 5 449 449 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 450 DELUGED_USER="deluge" # CHANGE THIS 451 test -n "$DELUGED_USER" || exit 6 452 453 DELUGED_ARGS="-P /.config/deluge/deluged.pid -c /.config/deluge/ -l /.config/deluge/deluged.log" # consult man deluged for more options 456 454 457 455 . /etc/rc.status … … 472 470 start) 473 471 474 475 476 477 478 479 480 481 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 ;; 483 481 stop) 484 485 486 487 488 489 490 491 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 ;; 493 491 try-restart) 494 492 ## Stop the service and if this succeeds (i.e. the … … 509 507 ;; 510 508 force-reload|reload) 511 512 513 514 515 516 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 517 515 518 516 rc_status -v … … 520 518 ;; 521 519 status) 522 520 echo -n "Checking for service DELUGED " 523 521 ## Check status with checkproc(8), if process is running 524 522 ## checkproc will return with exit status 0. … … 530 528 # 3 - service not running 531 529 532 533 534 535 530 checkproc $DELUGED_BIN 531 532 rc_status -v 533 ;; 536 534 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 ;; 542 539 *) 543 544 545 540 echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}" 541 exit 1 542 ;; 546 543 esac 547 544 rc_exit … … 551 548 552 549 {{{ 553 #!sh554 550 #! /bin/sh 555 551 # Copyright (c) 1995-2000 SuSE GmbH Nuernberg, Germany. … … 573 569 # Default-Stop: 0 1 2 6 574 570 # 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 576 573 577 574 ### END INIT INFO … … 580 577 test -x $DELUGED_WEB_BIN || exit 5 581 578 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 579 DELUGED_WEB_USER="deluge" 588 580 589 581 . /etc/rc.status … … 604 596 start) 605 597 606 607 608 609 610 startproc -f -u $DELUGED_WEB_USER $DELUGED_WEB_BIN $DELUGED_WEB_ARGS 611 612 613 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 ;; 615 607 stop) 616 617 618 619 620 621 622 623 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 ;; 625 617 try-restart) 626 618 ## Stop the service and if this succeeds (i.e. the … … 641 633 ;; 642 634 force-reload|reload) 643 644 645 646 647 648 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 649 641 650 642 rc_status -v … … 652 644 ;; 653 645 status) 654 646 echo -n "Checking for service DELUGED_WEB " 655 647 ## Check status with checkproc(8), if process is running 656 648 ## checkproc will return with exit status 0. … … 662 654 # 3 - service not running 663 655 664 665 666 667 656 checkproc $DELUGED_WEB_BIN 657 658 rc_status -v 659 ;; 668 660 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 ;; 674 665 *) 675 676 677 666 echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}" 667 exit 1 668 ;; 678 669 esac 679 670 rc_exit