forked from Proxmox/ProxmoxVE
Compare commits
3 Commits
addons_pve
...
path_corre
| Author | SHA1 | Date | |
|---|---|---|---|
| 47f24897ea | |||
| 3dffd02f08 | |||
| f2f10376ac |
@ -27,20 +27,24 @@ function update_script() {
|
|||||||
msg_error "No ${APP} Installation Found!"
|
msg_error "No ${APP} Installation Found!"
|
||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
if ! [[ $(dpkg -s python3-xmlsec 2>/dev/null) ]]; then
|
||||||
|
$STD apt-get update
|
||||||
|
$STD apt-get install -y python3-xmlsec
|
||||||
|
fi
|
||||||
if cd /opt/tandoor && git pull | grep -q 'Already up to date'; then
|
if cd /opt/tandoor && git pull | grep -q 'Already up to date'; then
|
||||||
msg_ok "There is currently no update available."
|
msg_ok "There is currently no update available."
|
||||||
else
|
else
|
||||||
msg_info "Updating ${APP} (Patience)"
|
msg_info "Updating ${APP} (Patience)"
|
||||||
export $(cat /opt/tandoor/.env | grep "^[^#]" | xargs)
|
export $(cat /opt/tandoor/.env | grep "^[^#]" | xargs)
|
||||||
cd /opt/tandoor/
|
cd /opt/tandoor/ || exit
|
||||||
$STD pip3 install -r requirements.txt
|
$STD pip3 install -r requirements.txt
|
||||||
$STD /usr/bin/python3 /opt/tandoor/manage.py migrate
|
$STD /usr/bin/python3 /opt/tandoor/manage.py migrate
|
||||||
$STD /usr/bin/python3 /opt/tandoor/manage.py collectstatic --no-input
|
$STD /usr/bin/python3 /opt/tandoor/manage.py collectstatic --no-input
|
||||||
$STD /usr/bin/python3 /opt/tandoor/manage.py collectstatic_js_reverse
|
$STD /usr/bin/python3 /opt/tandoor/manage.py collectstatic_js_reverse
|
||||||
cd /opt/tandoor/vue
|
cd /opt/tandoor/vue || exit
|
||||||
$STD yarn install
|
$STD yarn install
|
||||||
$STD yarn build
|
$STD yarn build
|
||||||
cd /opt/tandoor
|
cd /opt/tandoor || exit
|
||||||
$STD python3 version.py
|
$STD python3 version.py
|
||||||
systemctl restart gunicorn_tandoor
|
systemctl restart gunicorn_tandoor
|
||||||
msg_ok "Updated ${APP}"
|
msg_ok "Updated ${APP}"
|
||||||
@ -55,4 +59,4 @@ description
|
|||||||
msg_ok "Completed Successfully!\n"
|
msg_ok "Completed Successfully!\n"
|
||||||
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
|
||||||
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
echo -e "${INFO}${YW} Access it using the following URL:${CL}"
|
||||||
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8002${CL}"
|
echo -e "${TAB}${GATEWAY}${BGN}http://${IP}:8002${CL}"
|
||||||
|
|||||||
@ -38,7 +38,8 @@ $STD apt-get install -y \
|
|||||||
python3 \
|
python3 \
|
||||||
python3-dev \
|
python3-dev \
|
||||||
python3-setuptools \
|
python3-setuptools \
|
||||||
python3-pip
|
python3-pip \
|
||||||
|
python3-xmlsec
|
||||||
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
|
rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
|
||||||
msg_ok "Setup Python3"
|
msg_ok "Setup Python3"
|
||||||
|
|
||||||
|
|||||||
@ -40,7 +40,7 @@ function clean_container() {
|
|||||||
header_info
|
header_info
|
||||||
name=$(pct exec "$container" hostname)
|
name=$(pct exec "$container" hostname)
|
||||||
echo -e "${BL}[Info]${GN} Cleaning ${name} ${CL} \n"
|
echo -e "${BL}[Info]${GN} Cleaning ${name} ${CL} \n"
|
||||||
pct exec $container -- bash -c "apt-get -y --purge autoremove && apt-get -y autoclean && bash <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/clean.sh) && rm -rf /var/lib/apt/lists/* && apt-get update"
|
pct exec "$container" -- bash -c "apt-get -y --purge autoremove && apt-get -y autoclean && bash <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/pve/clean.sh) && rm -rf /var/lib/apt/lists/* && apt-get update"
|
||||||
}
|
}
|
||||||
for container in $(pct list | awk '{if(NR>1) print $1}'); do
|
for container in $(pct list | awk '{if(NR>1) print $1}'); do
|
||||||
if [[ " ${excluded_containers[@]} " =~ " $container " ]]; then
|
if [[ " ${excluded_containers[@]} " =~ " $container " ]]; then
|
||||||
@ -56,18 +56,18 @@ for container in $(pct list | awk '{if(NR>1) print $1}'); do
|
|||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
status=$(pct status $container)
|
status=$(pct status "$container")
|
||||||
template=$(pct config $container | grep -q "template:" && echo "true" || echo "false")
|
template=$(pct config "$container" | grep -q "template:" && echo "true" || echo "false")
|
||||||
if [ "$template" == "false" ] && [ "$status" == "status: stopped" ]; then
|
if [ "$template" == "false" ] && [ "$status" == "status: stopped" ]; then
|
||||||
echo -e "${BL}[Info]${GN} Starting${BL} $container ${CL} \n"
|
echo -e "${BL}[Info]${GN} Starting${BL} $container ${CL} \n"
|
||||||
pct start $container
|
pct start "$container"
|
||||||
echo -e "${BL}[Info]${GN} Waiting For${BL} $container${CL}${GN} To Start ${CL} \n"
|
echo -e "${BL}[Info]${GN} Waiting For${BL} $container${CL}${GN} To Start ${CL} \n"
|
||||||
sleep 5
|
sleep 5
|
||||||
clean_container $container
|
clean_container "$container"
|
||||||
echo -e "${BL}[Info]${GN} Shutting down${BL} $container ${CL} \n"
|
echo -e "${BL}[Info]${GN} Shutting down${BL} $container ${CL} \n"
|
||||||
pct shutdown $container &
|
pct shutdown "$container" &
|
||||||
elif [ "$status" == "status: running" ]; then
|
elif [ "$status" == "status: running" ]; then
|
||||||
clean_container $container
|
clean_container "$container"
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|||||||
@ -4,7 +4,7 @@
|
|||||||
# Author: tteck (tteckster)
|
# Author: tteck (tteckster)
|
||||||
# License: MIT
|
# License: MIT
|
||||||
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
# bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/cron-update-lxcs.sh)"
|
# bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/pve/cron-update-lxcs.sh)"
|
||||||
|
|
||||||
clear
|
clear
|
||||||
cat <<"EOF"
|
cat <<"EOF"
|
||||||
@ -25,13 +25,13 @@ add() {
|
|||||||
*) echo "Please answer yes or no." ;;
|
*) echo "Please answer yes or no." ;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
sh -c '(crontab -l -u root 2>/dev/null; echo "0 0 * * 0 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin /bin/bash -c \"\$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/update-lxcs-cron.sh)\" >>/var/log/update-lxcs-cron.log 2>/dev/null") | crontab -u root -'
|
sh -c '(crontab -l -u root 2>/dev/null; echo "0 0 * * 0 PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin /bin/bash -c \"\$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/pve/update-lxcs-cron.sh)\" >>/var/log/update-lxcs-cron.log 2>/dev/null") | crontab -u root -'
|
||||||
clear
|
clear
|
||||||
echo -e "\n To view Cron Update LXCs logs: cat /var/log/update-lxcs-cron.log"
|
echo -e "\n To view Cron Update LXCs logs: cat /var/log/update-lxcs-cron.log"
|
||||||
}
|
}
|
||||||
|
|
||||||
remove() {
|
remove() {
|
||||||
(crontab -l | grep -v "github.com/community-scripts/ProxmoxVE/raw/main/misc/update-lxcs-cron.sh") | crontab -
|
(crontab -l | grep -v "update-lxcs-cron.sh") | crontab -
|
||||||
rm -rf /var/log/update-lxcs-cron.log
|
rm -rf /var/log/update-lxcs-cron.log
|
||||||
echo "Removed Crontab Schedule from Proxmox VE"
|
echo "Removed Crontab Schedule from Proxmox VE"
|
||||||
}
|
}
|
||||||
|
|||||||
@ -79,15 +79,15 @@ done
|
|||||||
|
|
||||||
# Add autodev settings
|
# Add autodev settings
|
||||||
CTID_CONFIG_PATH=/etc/pve/lxc/${CTID}.conf
|
CTID_CONFIG_PATH=/etc/pve/lxc/${CTID}.conf
|
||||||
sed '/autodev/d' $CTID_CONFIG_PATH >CTID.conf
|
sed '/autodev/d' "$CTID_CONFIG_PATH" >CTID.conf
|
||||||
cat CTID.conf >$CTID_CONFIG_PATH
|
cat CTID.conf >"$CTID_CONFIG_PATH"
|
||||||
|
|
||||||
cat <<EOF >>$CTID_CONFIG_PATH
|
cat <<EOF >>"$CTID_CONFIG_PATH"
|
||||||
lxc.autodev: 1
|
lxc.autodev: 1
|
||||||
lxc.hook.autodev: bash -c '$HOOK_SCRIPT'
|
lxc.hook.autodev: bash -c '$HOOK_SCRIPT'
|
||||||
EOF
|
EOF
|
||||||
echo -e "\e[1;33m \nFinished....Reboot ${CTID} LXC to apply the changes.\n \e[0m"
|
echo -e "\e[1;33m \nFinished....Reboot ${CTID} LXC to apply the changes.\n \e[0m"
|
||||||
|
|
||||||
# In the Proxmox web shell run
|
# In the Proxmox web shell run
|
||||||
# bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/frigate-support.sh)"
|
# bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/pve/frigate-support.sh)"
|
||||||
# Reboot the LXC to apply the changes
|
# Reboot the LXC to apply the changes
|
||||||
|
|||||||
@ -5,7 +5,7 @@
|
|||||||
# License: MIT
|
# License: MIT
|
||||||
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
# Execute within the Proxmox shell
|
# Execute within the Proxmox shell
|
||||||
# bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/hw-acceleration.sh)"
|
# bash -c "$(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/tools/pve/hw-acceleration.sh)"
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
function header_info {
|
function header_info {
|
||||||
@ -76,7 +76,7 @@ else
|
|||||||
fi
|
fi
|
||||||
header_info
|
header_info
|
||||||
|
|
||||||
cat <<EOF >>/etc/pve/lxc/${privileged_container}.conf
|
cat <<EOF >>/etc/pve/lxc/"${privileged_container}".conf
|
||||||
lxc.cgroup2.devices.allow: c 226:0 rwm
|
lxc.cgroup2.devices.allow: c 226:0 rwm
|
||||||
lxc.cgroup2.devices.allow: c 226:128 rwm
|
lxc.cgroup2.devices.allow: c 226:128 rwm
|
||||||
lxc.cgroup2.devices.allow: c 29:0 rwm
|
lxc.cgroup2.devices.allow: c 29:0 rwm
|
||||||
@ -89,7 +89,7 @@ read -r -p "Do you need the intel-media-va-driver-non-free driver (Debian 12 onl
|
|||||||
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
|
if [[ ${prompt,,} =~ ^(y|yes)$ ]]; then
|
||||||
header_info
|
header_info
|
||||||
msg_info "Installing Hardware Acceleration (non-free)"
|
msg_info "Installing Hardware Acceleration (non-free)"
|
||||||
pct exec ${privileged_container} -- bash -c "cat <<EOF >/etc/apt/sources.list.d/non-free.list
|
pct exec "${privileged_container}" -- bash -c "cat <<EOF >/etc/apt/sources.list.d/non-free.list
|
||||||
|
|
||||||
deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
|
deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
|
||||||
deb-src http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
|
deb-src http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware
|
||||||
@ -101,12 +101,12 @@ deb http://deb.debian.org/debian bookworm-updates main contrib non-free non-free
|
|||||||
deb-src http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
|
deb-src http://deb.debian.org/debian bookworm-updates main contrib non-free non-free-firmware
|
||||||
EOF"
|
EOF"
|
||||||
|
|
||||||
pct exec ${privileged_container} -- bash -c "silent() { \"\$@\" >/dev/null 2>&1; } && $STD apt-get update && $STD apt-get install -y intel-media-va-driver-non-free ocl-icd-libopencl1 intel-opencl-icd vainfo intel-gpu-tools && $STD adduser \$(id -u -n) video && $STD adduser \$(id -u -n) render"
|
pct exec "${privileged_container}" -- bash -c "silent() { \"\$@\" >/dev/null 2>&1; } && $STD apt-get update && $STD apt-get install -y intel-media-va-driver-non-free ocl-icd-libopencl1 intel-opencl-icd vainfo intel-gpu-tools && $STD adduser \$(id -u -n) video && $STD adduser \$(id -u -n) render"
|
||||||
msg_ok "Installed Hardware Acceleration (non-free)"
|
msg_ok "Installed Hardware Acceleration (non-free)"
|
||||||
else
|
else
|
||||||
header_info
|
header_info
|
||||||
msg_info "Installing Hardware Acceleration"
|
msg_info "Installing Hardware Acceleration"
|
||||||
pct exec ${privileged_container} -- bash -c "silent() { \"\$@\" >/dev/null 2>&1; } && $STD apt-get install -y va-driver-all ocl-icd-libopencl1 intel-opencl-icd vainfo intel-gpu-tools && chgrp video /dev/dri && chmod 755 /dev/dri && $STD adduser \$(id -u -n) video && $STD adduser \$(id -u -n) render"
|
pct exec "${privileged_container}" -- bash -c "silent() { \"\$@\" >/dev/null 2>&1; } && $STD apt-get install -y va-driver-all ocl-icd-libopencl1 intel-opencl-icd vainfo intel-gpu-tools && chgrp video /dev/dri && chmod 755 /dev/dri && $STD adduser \$(id -u -n) video && $STD adduser \$(id -u -n) render"
|
||||||
msg_ok "Installed Hardware Acceleration"
|
msg_ok "Installed Hardware Acceleration"
|
||||||
fi
|
fi
|
||||||
sleep 1
|
sleep 1
|
||||||
|
|||||||
Reference in New Issue
Block a user