VirtualHere USB 服务器和 systemd 自动启动在 x86_64 上 25 秒内完成

以下脚本将下载名为 vhusbd.service 的 x86_64 VirtualHere USB 服务器。

install_vhusbd.sh
#!/bin/bash
# This script installs and enables/starts the VirtualHere USB server
wget -O /usr/bin/vhusbd https://www.virtualhere.com/sites/default/files/usbserver/vhusbdx86_64
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: Networking