Compare commits

...

3 Commits

Author SHA1 Message Date
tteckster 4cddfa3b12
Update collabora.sh
adjust resources
2024-09-05 11:44:26 -04:00
tteckster 4d9d7a8242
Update pull_request_template.md
tweak
2024-09-05 10:16:14 -04:00
tteckster b129cb1767
Update update-lxcs-cron.sh
tweak
2024-09-05 06:07:26 -04:00
3 changed files with 15 additions and 22 deletions

View File

@ -1,18 +1,20 @@
## I wanted to make you aware that I am meticulous when it comes to merging code into the main branch, so please don't take it personally if I reject your request.
> [!NOTE]
I am meticulous when it comes to merging code into the main branch, so please understand that I may reject pull requests that do not meet the project's standards. It's never personal. Also, game-related scripts have a lower chance of being merged.
## Description
Please include a summary of the change and/or which issue is fixed.
Provide a summary of the changes made and/or reference the issue being addressed.
Fixes # (issue)
## Type of change
Please delete options that are not relevant.
Please check the relevant option(s):
- [ ] Bug fix (non-breaking change that resolves an issue)
- [ ] New feature (non-breaking change that adds functionality)
- [ ] Breaking change (a fix or feature that would cause existing functionality to change unexpectedly)
- [ ] New script (a fully functional and thoroughly tested script or set of scripts.)
- [ ] Self-review performed (I have reviewed my code, ensuring it follows established patterns and conventions)
- [ ] Documentation update required (this change requires an update to the documentation)
- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] New Script (Develop a new script or set of scripts that are fully functional and thoroughly tested)
- [ ] I have performed a self-review of my code, adhering to established codebase patterns and conventions.
- [ ] This change requires a documentation update

View File

@ -21,7 +21,7 @@ header_info
echo -e "Loading..."
APP="Collabora"
var_disk="12"
var_cpu="1"
var_cpu="2"
var_ram="1024"
var_os="debian"
var_version="12"

View File

@ -5,24 +5,18 @@
# License: MIT
# https://github.com/tteck/Proxmox/raw/main/LICENSE
echo "$(date)"
echo -e "\n $(date)"
excluded_containers=("$@")
function update_container() {
container=$1
name=$(pct exec "$container" hostname)
echo -e "\n [Info] Updating $container : $name \n"
os=$(pct config "$container" | awk '/^ostype/ {print $2}')
if [[ "$os" == "ubuntu" || "$os" == "debian" ]]; then
disk_info=$(pct exec "$container" df /boot | awk 'NR==2{gsub("%","",$5); printf "%s %.1fG %.1fG %.1fG", $5, $3/1024/1024, $2/1024/1024, $4/1024/1024 }')
read -ra disk_info_array <<<"$disk_info"
echo -e "\n[Info] Updating $container : $name - Boot Disk: ${disk_info_array[0]}% full [${disk_info_array[1]}/${disk_info_array[2]} used, ${disk_info_array[3]} free]"
else
echo -e "\n[Info] Updating $container : $name - [No disk info for ${os}]"
fi
case "$os" in
alpine) pct exec "$container" -- ash -c "apk update && apk upgrade" ;;
archlinux) pct exec "$container" -- bash -c "pacman -Syyu --noconfirm" ;;
fedora | rocky | centos | alma) pct exec "$container" -- bash -c "dnf -y update && dnf -y upgrade" ;;
ubuntu | debian | devuan) pct exec "$container" -- bash -c "apt-get update 2>/dev/null | grep 'packages.*upgraded'; apt-get upgrade --dry-run && DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confold" dist-upgrade -y; rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED" ;;
ubuntu | debian | devuan) pct exec "$container" -- bash -c "apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -o Dpkg::Options::="--force-confold" dist-upgrade -y; rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED" ;;
esac
}
@ -43,7 +37,6 @@ for container in $(pct list | awk '{if(NR>1) print $1}'); do
if [ "$template" == "false" ] && [ "$status" == "status: stopped" ]; then
echo -e "[Info] Starting $container"
pct start $container
echo -e "[Info] Waiting For $container To Start"
sleep 5
update_container $container
echo -e "[Info] Shutting down $container"
@ -54,5 +47,3 @@ for container in $(pct list | awk '{if(NR>1) print $1}'); do
fi
done
wait
echo -e "Finished, All Containers Updated. \n"