这是脚本内容,位于 /etc/init.d/myserviced:
#!/lib/init/init-d-script
DAEMON="/usr/local/bin/myprogram.py"
NAME="myserviced"
DESC="The description of my service"
当我启动服务时(通过直接调用或调用sudo service myserviced start
),我可以看到程序myprogram.py
运行,但它没有返回命令提示符。
我想一定有什么我误解了,那是什么?
该系统是 Debian,在 Raspberry Pi 上运行。