VirtualHere USB-сервер и автозапуск через systemd на Raspberry Pi за 15 секунд

Следующий скрипт загрузит VirtualHere USB-сервер для Raspberry Pi (универсальная версия для ARM) и создаст systemd-службу под названием vhusbd.service.

Если вы не используете Raspberry Pi, см. страницу загрузки сервера VirtualHere для получения файла.

install_vhusbd.sh
#!/bin/bash
# This script installs and enables and starts the VirtualHere USB server
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

# Enable and start service
systemctl enable --now vhusbd.service

Check out similar posts by category: Embedded Raspberry Pi