次のスクリプトは、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
この記事が役に立った場合は、TechOverflow での新しい記事の調査と公開を支援するため、「Buy Me a Coffee」でのご支援、または PayPal 経由でのご寄付をご検討ください