-1
我在启动时使用了Raspberrypi中的NodeJs(rc.local)。我有一些问题,如果NodeJs在启动时运行,我的ftp客户端将无法下载数据。 但如果我通过我自己的命令行运行,它将很好地工作,并且能够通过FTP客户端下载文件。在启动时在树莓派中使用nodejs时,如何查看控制台
有什么方法可以在启动时使用nodejs来查看控制台日志。
我的项目已经很晚了,请帮忙。
在此先感谢。
rc.local中
`#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
#sudo neo4j start &
#sudo su pi -c 'sudo neo4j start < /dev/null &'
#sudo su pi -c 'sudo /etc/init.d/mysql start < /dev/null &'
sudo su pi -c 'node /home/pi/Desktop/RaspberyryPiLearning/bin/www <
/home/pi/Desktop/error.log &'
# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
printf "My IP address is %s\n" "$_IP"
fi
exit 0
请帮助我需要你的帮助。 –
你可以发布你的rc.local的内容吗? – LMokrane
添加rc.local请看看并为延迟感到抱歉 –