Browse Source

Update mqtt_container.sh

tteckster 3 năm trước cách đây
mục cha
commit
b84aa466fc
1 tập tin đã thay đổi với 4 bổ sung1 xóa
  1. 4 1
      ct/mqtt_container.sh

+ 4 - 1
ct/mqtt_container.sh

@@ -164,7 +164,10 @@ msg "Starting LXC container..."
 pct start $CTID
 pct push $CTID mqtt_setup.sh /mqtt_setup.sh -perms 755
 pct exec $CTID /mqtt_setup.sh
-
+LXC_CONFIG=/etc/pve/lxc/${CTID}.conf
+cat <<EOF >> $LXC_CONFIG
+unprivileged: 1
+EOF
 # Get network details and show completion message
 IP=$(pct exec $CTID ip a s dev eth0 | sed -n '/inet / s/\// /p' | awk '{print $2}')
 info "Successfully created a MQTT LXC Container to $CTID at IP Address ${IP}"