我正在使用带有 busybox 的嵌入式 Linux。我想自动运行名为“myApplication”的应用程序(启动后运行级别 5,所有服务均已启动)。
到目前为止我所做的:
::sysinit:/etc/init.d/S90myscript
该脚本包含以下内容:
! /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
Run Code Online (Sandbox Code Playgroud)
我错过了什么吗?符号链接?难道是我做错了什么?
先感谢您