-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請看看併爲延遲感到抱歉 –