Raspberry Pi で VirtualHere USB サーバーと systemd 自動起動を 15 秒で設定

次のスクリプトは、Raspberry Pi 用の VirtualHere USB サーバー(ARM 用汎用バージョン)をダウンロードし、vhusbd.service という systemd サービスを作成します。

Raspberry Pi を使用していない場合は、VirtualHere サーバーダウンロードページから取得してください。

install_vhusbd.sh
#!/bin/bash
# このスクリプトは VirtualHere USB サーバーをインストールし、有効化して起動します
wget -O /usr/bin/vhusbd https://www.virtualhere.com/sites/default/files/usbserver/vhusbdarm
chmod a+x /usr/bin/vhusbd

cat >/etc/systemd/system/vhusbd.service <<EOF
[Unit]
Description=vhusbd
After=network-online.target

[Service]
Restart=always
User=root
Group=root
ExecStart=/usr/bin/vhusbd

[Install]
WantedBy=multi-user.target
EOF

# サービスを有効化して起動
systemctl enable --now vhusbd.service

同じカテゴリの類似記事をチェック: 組み込み Raspberry Pi