Maintenance (#681)

* Maintenance
This commit is contained in:
tteckster 2022-10-29 21:04:45 -04:00 committed by GitHub
parent e7ec3d0275
commit 8e331fcbff
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
155 changed files with 12962 additions and 11552 deletions

View file

@ -1,12 +1,12 @@
#!/usr/bin/env bash
echo -e "\e[1;33m This script will Prepare a LXC Container for Frigate \e[0m"
while true; do
read -p "Did you replace 106 with your LXC ID? Proceed (y/n)?" yn
case $yn in
[Yy]* ) break;;
[Nn]* ) exit;;
* ) echo "Please answer yes or no.";;
esac
read -p "Did you replace 106 with your LXC ID? Proceed (y/n)?" yn
case $yn in
[Yy]*) break ;;
[Nn]*) exit ;;
*) echo "Please answer yes or no." ;;
esac
done
set -o errexit
set -o errtrace
@ -48,7 +48,7 @@ for char_dev in ${CHAR_DEVS[@]}; do
CHAR_DEV_STRING+=" -regex \".*/${char_dev}\""
done
read -r -d '' HOOK_SCRIPT <<- EOF || true
read -r -d '' HOOK_SCRIPT <<-EOF || true
for char_dev in \$(find /sys/dev/char -regextype sed $CHAR_DEV_STRING); do
dev="/dev/\$(sed -n "/DEVNAME/ s/^.*=\(.*\)$/\1/p" \${char_dev}/uevent)";
mkdir -p \$(dirname \${LXC_ROOTFS_MOUNT}\${dev});
@ -66,7 +66,7 @@ CTID_CONFIG_PATH=/etc/pve/lxc/${CTID}.conf
sed '/autodev/d' $CTID_CONFIG_PATH >CTID.conf
cat CTID.conf >$CTID_CONFIG_PATH
cat <<EOF >> $CTID_CONFIG_PATH
cat <<EOF >>$CTID_CONFIG_PATH
lxc.autodev: 1
lxc.hook.autodev: bash -c '$HOOK_SCRIPT'
EOF