Update deconz-v4.sh

If the LXC is created Privileged, the script will automatically set up USB passthrough.
This commit is contained in:
tteckster 2022-11-02 20:41:46 -04:00 committed by GitHub
parent d6ef841b9b
commit dc5728dced
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -256,6 +256,7 @@ export PCT_OPTIONS="
$PW
"
bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit
if [ "$CT_TYPE" == "0" ]; then
LXC_CONFIG=/etc/pve/lxc/${CTID}.conf
cat <<EOF >>$LXC_CONFIG
lxc.cgroup2.devices.allow: a
@ -264,9 +265,11 @@ lxc.cgroup2.devices.allow: c 188:* rwm
lxc.cgroup2.devices.allow: c 189:* rwm
lxc.mount.entry: /dev/serial/by-id dev/serial/by-id none bind,optional,create=dir
lxc.mount.entry: /dev/ttyUSB0 dev/ttyUSB0 none bind,optional,create=file
lxc.mount.entry: /dev/ttyUSB1 dev/ttyUSB1 none bind,optional,create=file
lxc.mount.entry: /dev/ttyACM0 dev/ttyACM0 none bind,optional,create=file
lxc.mount.entry: /dev/ttyACM1 dev/ttyACM1 none bind,optional,create=file
EOF
fi
msg_info "Starting LXC Container"
pct start $CTID
msg_ok "Started LXC Container"