raspberry-pi - 在树莓派启动两个 Discord Bot
问题描述
我尝试在我的树莓派上托管两个不和谐机器人,我想让机器人在启动时自动启动 PI,所以我将它添加到我的 /etc/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.
cd /home/pi/SoBot2
forever bot.js
^C
cd /home/pi/PoloBot
node bot.js
^C
但唯一的第一个机器人开始。
解决方案
推荐阅读
- python - KeyError,熊猫做奇怪的事情
- swift - CGAffineTransform 转换为负 X 不起作用
- javascript - chartjs图表溢出容器
- postgresql - 将数据从 CSV 复制到 postgres 忽略唯一键违规
- cmake - CMake 可以告诉我哪个模块或配置文件用于 find_package() 吗?
- r - 从具有特定条件的数据框中获取不同的行
- javascript - 在 fetch() 上什么都没有发生
- c# - 在不执行构建过程的情况下保持 url 角度的最佳方法
- python - 如何通过阈值打破数据帧?
- php - SQLSTATE [42000]:语法错误或访问冲突:laravel 中 groupby 的 1055