Page 1 of 1
hello help with autostart

Posted:
Fri Jul 01, 2016 11:29 am
by mikeeps2
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
Re: hello help with autostart

Posted:
Tue Jul 05, 2016 6:16 pm
by steven
Hi mikeeps2
You can put your astra script in
/usr/bin/lcd.sh
It will auto run it
Thanks
Kind Regards
steven
Re: hello help with autostart

Posted:
Fri Jul 15, 2016 12:16 pm
by mikeeps2
hi steven , what script use ? i test few script but dont work for me , i dont know what more to do
Re: hello help with autostart

Posted:
Fri Jul 15, 2016 12:23 pm
by mikeeps2
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
Re: hello help with autostart

Posted:
Fri Jul 15, 2016 6:47 pm
by steven
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
Re: hello help with autostart

Posted:
Sun Jul 24, 2016 3:05 pm
by mikeeps2
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