BBBmini startup

BBBmini に自動起動の説明が、無かったので。。。
Creating a service to startup at BeagleBone Black boot time:

- Create a shell script such as /usr/bin/ArduCopterBash.sh:

#!/bin/bash

# starting ArduCopter
sudo /opt/apm/bin/ArduCopter -B /dev/ttyS5 -A udp:192.168.10.2:14550


Note that the first line is critical.

- Create a service file in /lib/systemd/system/ArduCopter.service:

[Unit]
Description=ArduCopter Service

[Service]
Type=simple
ExecStart=/usr/bin/ArduCopterBash.sh

[Install]
WantedBy=multi-user.target

- Create a symbolic link between your script and a special location under /etc:

ln -s /lib/systemd/ArduCopte.service /etc/systemd/system/ArduCopter.service

- Make systemd aware of your new service

systemctl daemon-reload
systemctl enable ArduCopter.service
systemctl start ArduCopter.service

- Reboot the BeagleBone Black to see your script in action

元ネタは、こちらです。
https://gist.github.com/tstellanova/7323116

BIGLOBEニュースロゴ

ニュースをもっと見る

最近の画像付き記事