Moderator Control Panel ]

hello help with autostart

hello help with autostart

Postby mikeeps2 » Fri Jul 01, 2016 11:29 am

hi , i have astra on my moi plus , but i try to use the autostart script but dont working for me , anyone one can help me

i have my file on etc/astra/cuba.lua

i need when the moi plus reboot ,start auto the astra config , thanks mikee
mikeeps2
 
Posts: 14
Joined: Wed Aug 06, 2014 11:29 am

Re: hello help with autostart

Postby steven » Tue Jul 05, 2016 6:16 pm

Hi mikeeps2

You can put your astra script in
/usr/bin/lcd.sh
It will auto run it

Thanks

Kind Regards

steven
steven
 
Posts: 2239
Joined: Fri Aug 06, 2010 3:23 pm

Re: hello help with autostart

Postby mikeeps2 » Fri Jul 15, 2016 12:16 pm

hi steven , what script use ? i test few script but dont work for me , i dont know what more to do
mikeeps2
 
Posts: 14
Joined: Wed Aug 06, 2014 11:29 am

Re: hello help with autostart

Postby mikeeps2 » Fri Jul 15, 2016 12:23 pm

i test this script
Code: Select All Code
#!/bin/sh
### BEGIN INIT INFO
# Provides:          astra
# Required-Start:    $network $syslog $named
# Required-Stop:    $network $syslog $named
# Default-Start:    2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start/stop astra
### END INIT INFO
 
if [ -z "$1" ] ; then
    echo "Usage: $0 [start|stop]"
    exit 0
fi
 
ASTRA_NAME=`cuba $0`
PIDFILE="/var/run/$ASTRA_NAME.pid"
CONFIG="/etc/astra/$ASTRA_NAME.lua"
 
if [ "$1" = "start" ] ; then
    /usr/bin/astra $CONFIG &
    PID=$!
    echo $PID >$PIDFILE
elif [ "$1" = "stop" ] ; then
    /bin/kill $(/bin/cat $PIDFILE)
    rm -f $PIDFILE
fi



dont work

i test another script

Code: Select All Code
#!/bin/sh

### BEGIN INIT INFO
# Provides:          astra
# Required-Start:    $network $syslog $named
# Required-Stop:     $network $syslog $named
# Default-Start:     2 3 4 5
# Default-Stop:      0 1 6
# Short-Description: Start/stop astra
### END INIT INFO

set -e

if [ -z "$1" ] ; then
    echo "Usage: $0 [start|stop|restart]"
    exit 0
fi

if [ "$1" = "start" ] ; then
    ulimit -n 65536
    /usr/bin/astra --pid /var/run/astra.pid --log /var/log/astra.log -c /etc/astra/astra.conf -p 8000 --daemon
elif [ "$1" = "stop" ] ; then
    kill `cat /var/run/astra.pid`
elif [ "$1" = "restart" ] ; then
    $0 stop
    sleep 1
    $0 start
fi



dont work for me

i dont know what need chance

i only have the file.lua , where i put the channel config , but i turn on manual , i need autostart please
mikeeps2
 
Posts: 14
Joined: Wed Aug 06, 2014 11:29 am

Re: hello help with autostart

Postby steven » Fri Jul 15, 2016 6:47 pm

Hi

You just put your command
/usr/bin/astra --pid /var/run/astra.pid --log /var/log/astra.log -c /etc/astra/astra.conf -p 8000 --daemon
to this file
/usr/bin/lcd.sh

Then it will auto start when MOI+ boot , or you can send an email to our engineer jack@tbsdtv.com he will tell you the detail steps to create a service to auto start.

Thanks

Kind Regards


steven
steven
 
Posts: 2239
Joined: Fri Aug 06, 2010 3:23 pm

Re: hello help with autostart

Postby mikeeps2 » Sun Jul 24, 2016 3:05 pm

hi steve , i have jack in my skype , i send many message but dont answer back


i dont have lcd.sh inside to /usr/bin , i dont see that file there
mikeeps2
 
Posts: 14
Joined: Wed Aug 06, 2014 11:29 am


Return to MOI+

Who is online

Users browsing this forum: No registered users and 3 guests