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!
  1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

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:
    418
    Likes Received:
    10
    Trophy Points:
    18
    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
     
  2. cPanelMichael

    cPanelMichael Forums Analyst
    Staff Member

    Joined:
    Apr 11, 2011
    Messages:
    38,658
    Likes Received:
    1,427
    Trophy Points:
    363
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page