我喜欢在启动时在我的 Raspberry Pi 上启动我的 Siriproxy 服务器。我必须输入
cd siriproxy
rvmsudo siriproxy server
在终端中启动 Siriproxy。有没有办法在启动时运行命令?
非常感谢,
大卫
这是我编辑的脚本:
#!/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.
# Print the IP address
_IP=$(hostname -I) || true
if [ "$_IP" ]; then
printf "My IP address is %s\n" "$_IP"
fi
#I added this line
/home/pi/siriproxy server
exit 0
/etc/init.d/cron start