From 787862645e7432a126139e61142e05f9c6dec7d6 Mon Sep 17 00:00:00 2001 From: tteckster Date: Thu, 29 Sep 2022 06:33:08 -0400 Subject: [PATCH] Update homeassistant-v4.sh --- ct/homeassistant-v4.sh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/ct/homeassistant-v4.sh b/ct/homeassistant-v4.sh index 2a521357..18d1c534 100644 --- a/ct/homeassistant-v4.sh +++ b/ct/homeassistant-v4.sh @@ -232,10 +232,22 @@ export PCT_OPTIONS=" " bash -c "$(wget -qLO - https://raw.githubusercontent.com/tteck/Proxmox/main/ct/create_lxc.sh)" || exit LXC_CONFIG=/etc/pve/lxc/${CTID}.conf +if [ "$CT_TYPE" == "0" ]; then cat <> $LXC_CONFIG lxc.cgroup2.devices.allow: a lxc.cap.drop: +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/ttyACM0 dev/ttyACM0 none bind,optional,create=file +lxc.mount.entry: /dev/ttyACM1 dev/ttyACM1 none bind,optional,create=file EOF +else +cat <> $LXC_CONFIG +lxc.cgroup2.devices.allow: a +lxc.cap.drop: +fi msg_info "Starting LXC Container" pct start $CTID msg_ok "Started LXC Container"