I am using an embedded linux with busybox. I would like to automatically run my app called "myApplication" (runlevel 5 after boot all the services are up).
What I have done so far:
- I made a script under /etc/init.d/ called S90myscript
- Then I added this line to the inittab:
::sysinit:/etc/init.d/S90myscript
The script contains the following:
! /bin/sh
### BEGIN INIT INFO
# Provides: myApplication
# Should-Start: $all
# Required-Start: $remote_fs $network $local_fs
# Required-Stop: $remote_fs
# Default-Start: 5
# Default-Stop: 0 6
# Short-Description: start myprogram at boot time
### END INIT INFO
#
set -e
. /lib/lsb/init-functions
PATH=/root:/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/sbin
PROGRAMNAME="myApplication"
case "$1" in
start)
$PROGRAMNAME
;;
stop)
skill $PROGRAMNAME
;;
esac
exit 0
Am I missing something? Symlinks? Is what I did wrong?
Thank you in advance