Please whitelist cPanel in your adblocker so that you’re able to see our version release promotions, thanks!

The Community Forums

Interact with an entire community of cPanel & WHM users!

xbt auto start after reboot

Discussion in 'General Discussion' started by Nirjonadda, May 10, 2015.

  1. Nirjonadda

    Nirjonadda Well-Known Member

    Joined:
    May 8, 2013
    Messages:
    597
    Likes Received:
    15
    Trophy Points:
    68
    cPanel Access Level:
    Root Administrator
    Hello,

    I'm trying to insert xbt_tracker into the startup services of my server. This is what I've done,but it doesn't work. Please any one can let me know, How can I make the xbt_tracker starting after a reboot automatically?

    /etc/init.d/xbtt

    Code:
    #!/bin/sh
    
    ### BEGIN INIT INFO
    # Provides:          xbtt
    # Required-Start:    $local_fs $remote_fs $network
    # Required-Stop:     $local_fs $remote_fs $network
    # Default-Start:     2 3 4 5
    # Default-Stop:      0 1 6
    # Short-Description: xbtt
    # Description:       Starts and stops the XBT Torrent tracker server
    ### END INIT INFO
    
    XBT_PATH="/xbt"
    start() {
    echo "Starting XBT Tracker"
    
    start-stop-daemon --start --quiet --exec $XBT_PATH/xbt_tracker -- --conf_file $XBT_PATH/xbt_tracker.conf
    echo $?
    }
    stop() {
    echo "Stopping XBT Tracker"
    start-stop-daemon --stop --quiet --pidfile /var/run/xbt.pid
    echo $?
    }
    case "$1" in
    start)
    start
    ;;
    stop)
    stop
    ;;
    restart)
    stop
    sleep 2
    start
    ;;
    *)
    echo "Usage: $0 {start|stop|restart}"
    exit 1
    esac
    exit 1
     
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    43,870
    Likes Received:
    1,811
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
    Stop hovering to collapse... Click to collapse... Hover to expand... Click to expand...
Loading...

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice