Entware is like a Linux in the ADMMaxmen wrote:i cant to understand how to start installed with opkg apps and how to make is autostarted.
In my case i installed cups and i cant to find the way to start it.
... in /opt/etc/init.d you can add your own script starting by Snn (nn determine the order to start it)
... ... verify perhaps a script was created for CUPS so you can test it ... /opt/etc/init.d/Sxxscript start
... ... if not create your own
... at each start of Entware APKG ... the shell /opt/etc/init.d/rc.unslug is called , this shell search for Snn... file and start it
Code: Select all
#!/bin/sh
PATH=/opt/sbin:/opt/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
# Start/stop all init scripts in /opt/etc/init.d including symlinks
# starting them in numerical order and
# stopping them in reverse numerical order
#logger "Started $0${*:+ $*}."
ACTION=$1
CALLER=$2
if [ $# -lt 1 ]; then
printf "Usage: $0 {start|stop|restart|reconfigure|check|kill}\n" >&2
exit 1
fi
[ $ACTION = stop -o $ACTION = restart -o $ACTION = kill ] && ORDER="-r"
for i in $(/opt/bin/find /opt/etc/init.d/ -perm '-u+x' -name 'S*' | sort $ORDER ) ;
do
case "$i" in
S* | *.sh )
# Source shell script for speed.
trap "" INT QUIT TSTP EXIT
#set $1
#echo "trying $i" >> /tmp/rc.log
. $i $ACTION $CALLER
;;
*)
# No sh extension, so fork subprocess.
$i $ACTION $CALLER
;;
esac
done
Philippe.