小编mog*_*tas的帖子

如何在 rc.local 中运行脚本

我是这个平台的新手。我有关于rc.local 的问题。我创建了一个脚本来自动运行roscoreroslaunch rosbridge_server rosbridge_websocket.launch。此脚本名称为auto,脚本内容为:

#!/bin/sh
cd $home
xterm -hold -e "roscore" &
xterm -hold -e "roslaunch rosbridge_server rosbridge_websocket.launch"
exit 0
Run Code Online (Sandbox Code Playgroud)

我必须在 rc.local 中运行这个脚本。创建的 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 …
Run Code Online (Sandbox Code Playgroud)

startup scripts

5
推荐指数
1
解决办法
5万
查看次数

标签 统计

scripts ×1

startup ×1