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:
    150
    Likes Received:
    2
    Trophy Points:
    18
    cPanel Access Level:
    Website Owner
    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:
    30,723
    Likes Received:
    660
    Trophy Points:
    113
    cPanel Access Level:
    Root Administrator
Loading...

Share This Page