Welcome!

Welcome to Satlover forums, full of great people, ideas and excitement.

Please register if you would like to take part. link..

Register Now

Alert: Don't Use Hotmail Email Accounts for registration

Collapse

Before Access to all Forums and Trial accounts you must need to activate your account Email address

GBox Restart Script

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • urkal
    Member
    • Mar 2010
    • 64

    GBox Restart Script

    Hi everyone id like to tell you that your forum is excellent.How can i restart my gbox on linux using a script?

    Also is there a way to use a gbox control for example to see how many cards i get on the linux pc?


    Thanxs
  • Kabble
    Newbie
    • Jan 2013
    • 4

    #2
    Re: GBox Restart Script

    I use this script on my Linux machine:

    Code:
    #!/bin/sh
    
    NAME=gbox
    DESC="Gbox"
    DAEMON=/var/bin/$NAME
    PID=/var/run/gbox.pid
    
    [ -x $DAEMON ] || exit 0
    
    [ -e /etc/default/$NAME ] && . /etc/default/$NAME
    
    . /lib/lsb/init-functions
    
    start_daemon () {
            rm /nohup.out
            start-stop-daemon --start \
            $START_STOP_OPTIONS \
            --exec $DAEMON -- $OPTIONS
    }
    
    case "$1" in
      start)
            log_daemon_msg "Starting gbox daemon" "$NAME"
            start_daemon
            log_end_msg 0
            ;;
      stop)
            log_daemon_msg "Stopping gbox daemon" "$NAME"
            /usr/bin/killall gbox
            log_end_msg 0
            ;;
      restart|force-reload)
            log_daemon_msg "Restarting gbox daemon" "$NAME"
            killall gbox
            start_daemon
            log_end_msg 0
            ;;
        status)
            status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $?
            ;;
        *)
            echo "Usage: /etc/init.d/$NAME {start|stop|force-reload|restart|status}"
            exit 2
            ;;
    esac
    
    exit 0
    Hope it helps you.

    Restart is not working, althought.

    Comment

    Working...