Skip to content

Commit c259179

Browse files
authored
Merge pull request #178 from BassT23/beta
v4.3 release
2 parents d718a91 + 754a837 commit c259179

File tree

15 files changed

+644
-172
lines changed

15 files changed

+644
-172
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
---
2+
name: Bug report
3+
about: Create a report to help us improve
4+
title: ''
5+
labels: bug
6+
assignees: ''
7+
8+
---
9+
10+
**Describe the bug**
11+
A clear and concise description of what the bug is.
12+
13+
**To Reproduce**
14+
Steps to reproduce the behavior:
15+
1. Go to '...'
16+
2. Click on '....'
17+
3. Scroll down to '....'
18+
4. See error
19+
20+
**Expected behavior**
21+
A clear and concise description of what you expected to happen.
22+
23+
**Screenshots**
24+
If applicable, add screenshots to help explain your problem.
25+
26+
**VM/LXC (please complete the following information):**
27+
- OS: [e.g. iOS]
28+
- Version [e.g. 22]
29+
30+
**Used Version
31+
output of ```update status```
32+
33+
**Additional context**
34+
Add any other context about the problem here.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Feature request
3+
about: Suggest an idea for this project
4+
title: ''
5+
labels: feature-request
6+
assignees: ''
7+
8+
---
9+
10+
**Is your feature request related to a problem? Please describe.**
11+
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
12+
13+
**Describe the solution you'd like**
14+
A clear and concise description of what you want to happen.
15+
16+
**Describe alternatives you've considered**
17+
A clear and concise description of any alternative solutions or features you've considered.
18+
19+
**Additional context**
20+
Add any other context or screenshots about the feature request here.

CODE_OF_CONDUCT.md

Lines changed: 128 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,128 @@
1+
# Contributor Covenant Code of Conduct
2+
3+
## Our Pledge
4+
5+
We as members, contributors, and leaders pledge to make participation in our
6+
community a harassment-free experience for everyone, regardless of age, body
7+
size, visible or invisible disability, ethnicity, sex characteristics, gender
8+
identity and expression, level of experience, education, socio-economic status,
9+
nationality, personal appearance, race, religion, or sexual identity
10+
and orientation.
11+
12+
We pledge to act and interact in ways that contribute to an open, welcoming,
13+
diverse, inclusive, and healthy community.
14+
15+
## Our Standards
16+
17+
Examples of behavior that contributes to a positive environment for our
18+
community include:
19+
20+
* Demonstrating empathy and kindness toward other people
21+
* Being respectful of differing opinions, viewpoints, and experiences
22+
* Giving and gracefully accepting constructive feedback
23+
* Accepting responsibility and apologizing to those affected by our mistakes,
24+
and learning from the experience
25+
* Focusing on what is best not just for us as individuals, but for the
26+
overall community
27+
28+
Examples of unacceptable behavior include:
29+
30+
* The use of sexualized language or imagery, and sexual attention or
31+
advances of any kind
32+
* Trolling, insulting or derogatory comments, and personal or political attacks
33+
* Public or private harassment
34+
* Publishing others' private information, such as a physical or email
35+
address, without their explicit permission
36+
* Other conduct which could reasonably be considered inappropriate in a
37+
professional setting
38+
39+
## Enforcement Responsibilities
40+
41+
Community leaders are responsible for clarifying and enforcing our standards of
42+
acceptable behavior and will take appropriate and fair corrective action in
43+
response to any behavior that they deem inappropriate, threatening, offensive,
44+
or harmful.
45+
46+
Community leaders have the right and responsibility to remove, edit, or reject
47+
comments, commits, code, wiki edits, issues, and other contributions that are
48+
not aligned to this Code of Conduct, and will communicate reasons for moderation
49+
decisions when appropriate.
50+
51+
## Scope
52+
53+
This Code of Conduct applies within all community spaces, and also applies when
54+
an individual is officially representing the community in public spaces.
55+
Examples of representing our community include using an official e-mail address,
56+
posting via an official social media account, or acting as an appointed
57+
representative at an online or offline event.
58+
59+
## Enforcement
60+
61+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
62+
reported to the community leaders responsible for enforcement at
63+
Discord.
64+
All complaints will be reviewed and investigated promptly and fairly.
65+
66+
All community leaders are obligated to respect the privacy and security of the
67+
reporter of any incident.
68+
69+
## Enforcement Guidelines
70+
71+
Community leaders will follow these Community Impact Guidelines in determining
72+
the consequences for any action they deem in violation of this Code of Conduct:
73+
74+
### 1. Correction
75+
76+
**Community Impact**: Use of inappropriate language or other behavior deemed
77+
unprofessional or unwelcome in the community.
78+
79+
**Consequence**: A private, written warning from community leaders, providing
80+
clarity around the nature of the violation and an explanation of why the
81+
behavior was inappropriate. A public apology may be requested.
82+
83+
### 2. Warning
84+
85+
**Community Impact**: A violation through a single incident or series
86+
of actions.
87+
88+
**Consequence**: A warning with consequences for continued behavior. No
89+
interaction with the people involved, including unsolicited interaction with
90+
those enforcing the Code of Conduct, for a specified period of time. This
91+
includes avoiding interactions in community spaces as well as external channels
92+
like social media. Violating these terms may lead to a temporary or
93+
permanent ban.
94+
95+
### 3. Temporary Ban
96+
97+
**Community Impact**: A serious violation of community standards, including
98+
sustained inappropriate behavior.
99+
100+
**Consequence**: A temporary ban from any sort of interaction or public
101+
communication with the community for a specified period of time. No public or
102+
private interaction with the people involved, including unsolicited interaction
103+
with those enforcing the Code of Conduct, is allowed during this period.
104+
Violating these terms may lead to a permanent ban.
105+
106+
### 4. Permanent Ban
107+
108+
**Community Impact**: Demonstrating a pattern of violation of community
109+
standards, including sustained inappropriate behavior, harassment of an
110+
individual, or aggression toward or disparagement of classes of individuals.
111+
112+
**Consequence**: A permanent ban from any sort of public interaction within
113+
the community.
114+
115+
## Attribution
116+
117+
This Code of Conduct is adapted from the [Contributor Covenant][homepage],
118+
version 2.0, available at
119+
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
120+
121+
Community Impact Guidelines were inspired by [Mozilla's code of conduct
122+
enforcement ladder](https://github.com/mozilla/diversity).
123+
124+
[homepage]: https://www.contributor-covenant.org
125+
126+
For answers to common questions about this code of conduct, see the FAQ at
127+
https://www.contributor-covenant.org/faq. Translations are available at
128+
https://www.contributor-covenant.org/translations.

README.md

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,30 +28,37 @@ I am no member of the Proxmox Server Solutions GmbH. This is not an official pro
2828

2929
</div>
3030

31+
### What does the script do:
32+
- The script makes system updates with apt/dnf/pacman/apk or yum on all nodes/LXCs and VMs (if VMs prepared for that)
33+
- Make a snapshot before update (if your storage support it - [look here](https://pve.proxmox.com/wiki/Storage)). If not supported, you can choose to make a real backup, but this must be enabled in `update.conf` by user (take long time!)
34+
- After all, the updater makes a little cleaning (like `apt autoremove`)
35+
- If the script detects "extra" installations, it could update this also. Look in config file, for that.
36+
3137
### Features:
3238
- Update Proxmox VE (the host / all cluster nodes / all included LXCs and VMs)
3339
- Snapshot / Backup support (for Snapshot, your system must prepared for it)
3440
- Normal run is "Interactive" / Headless Mode can be run with `update -s`
3541
- Logging - location can be change in config file
3642
- Exit tracking, so you can send additional commands for finish or failure (edit files in `/etc/ultimate-updater/exit`)
3743
- [Config file](https://github.com/BassT23/Proxmox/tree/master#config-file)
44+
- Trim filesystem on ext4 nodes -
3845

3946
Info can be found with `update -h`
4047

4148
Changelog: [here](https://github.com/BassT23/Proxmox/blob/master/change.log)
4249

43-
### What does the script do:
44-
- The script makes system updates with apt/dnf/pacman/apk or yum on all nodes/LXCs and VMs (if VMs prepared for that)
45-
- Make a snapshot before update (if your storage support it - [look here](https://pve.proxmox.com/wiki/Storage)). If not supported, you can choose to make a real backup, but this must be enabled in `update.conf` by user (take long time!)
46-
- After all, the updater makes a little cleaning (like `apt autoremove`)
47-
- If the script detects "extra" installations, it could update this also. Look in config file, for that.
48-
4950
##
5051
# Installation:
5152
In Proxmox GUI Host Shell or as root on proxmox host terminal:
5253
```
5354
bash <(curl -s https://raw.githubusercontent.com/BassT23/Proxmox/master/install.sh)
5455
```
56+
57+
# Usage:
58+
- If you want to run the updater globally for all nodes/lxc/vm only run `update`
59+
- If you want to update only one specific lxc/vm run `update <ID>`
60+
61+
##
5562
## Cluster-Mode preparation:
5663
**! For Cluster Installation, you only need to install on one Host !**
5764

SECURITY.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Security Policy
2+
3+
## Supported Versions
4+
5+
6+
| Version | Supported |
7+
| ------- | ------------------ |
8+
| 4.x | :white_check_mark: |
9+
| < 4.0 | :x: |
10+
11+
## Reporting a Vulnerability
12+
13+
Issues can be reported [here](https://github.com/BassT23/Proxmox/issues) or per Discord

VMs/example

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,11 @@
1+
############################################################
2+
# - This file must be in the node who start the script. #
3+
# - If user is not root please look here: #
4+
# https://github.com/BassT23/Proxmox/blob/develop/ssh.md #
5+
############################################################
6+
17
IP="111.111.111.111"
8+
USER="root"
9+
SSH_VM_PORT="22"
10+
# Time in secounds
11+
SSH_START_DELAY_TIME="45"

change.log

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,28 @@
11
Changelog:
22
==========
33

4+
**v4.3** (23.02.2025)
5+
- add freebsd VM (QEMU and SSH Connection)
6+
- add non root user update in VMs
7+
- add autoclean for debian based systems
8+
- add filesystem trim for ext4 systems
9+
- add curl for internet check
10+
- add env settings for arch in config file
11+
- add kernel kleaning (disabled by default in config file)
12+
- fix run for only one LXC/VM with `update <ID>`
13+
- fix ioBroker Upgrade
14+
- fix arch upgrade
15+
- fix START/STOP/WAITING for stopped VMs
16+
- fix compatibility with "old" ssh connection
17+
- fix IP output by nodes
18+
- fix fedora autoremove
19+
- fix missing kernel infos
20+
- fix template detection
21+
- fix internet check
22+
- modify config file - checker settings now on the buttom
23+
- modify version check - check now all branches
24+
- code cleaning
25+
426
**v4.2** (01.12.2024)
527
- fix VM Template error
628
- fix Unifi-Controller Container

check-updates.sh

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,9 @@
44
# Check Updates #
55
#################
66

7+
# shellcheck disable=SC1017
78
# shellcheck disable=SC2034
9+
810
VERSION="1.5"
911

1012
#Variable / Function
@@ -247,9 +249,14 @@ CHECK_VM () {
247249
if ! (ssh "$IP" exit) >/dev/null 2>&1; then
248250
CHECK_VM_QEMU
249251
else
250-
OS_BASE=$(qm config "$VM" | grep ostype)
252+
OS_BASE=$(qm config "$VM" | grep ostype || true)
251253
if [[ "$OS_BASE" =~ l2 ]]; then
252-
OS=$(ssh "$IP" hostnamectl | grep System)
254+
KERNEL=$(qm guest cmd "$VM" get-osinfo | grep kernel-version || true)
255+
OS=$(ssh "$IP" hostnamectl | grep System || true)
256+
# if [[ "$KERNEL" =~ FreeBSD ]]; then
257+
# ssh -t -q -p "$SSH_VM_PORT" -tt "$USER"@"$IP" pkg update
258+
# return
259+
# fi
253260
if [[ "$OS" =~ Ubuntu ]] || [[ "$OS" =~ Debian ]] || [[ "$OS" =~ Devuan ]]; then
254261
ssh "$IP" "apt-get update" >/dev/null 2>&1
255262
SECURITY_APT_UPDATES=$(ssh "$IP" "apt-get -s upgrade | grep -ci ^inst.*security")
@@ -297,7 +304,12 @@ CHECK_VM () {
297304

298305
CHECK_VM_QEMU () {
299306
if qm guest exec "$VM" test >/dev/null 2>&1; then
300-
OS=$(qm guest cmd "$VM" get-osinfo | grep name)
307+
KERNEL=$(qm guest cmd "$VM" get-osinfo | grep kernel-version || true)
308+
OS=$(qm guest cmd "$VM" get-osinfo | grep name || true)
309+
# if [[ "$KERNEL" =~ FreeBSD ]]; then
310+
# qm guest exec "$VM" -- tcsh -c "pkg update"
311+
# return
312+
# fi
301313
if [[ "$OS" =~ Ubuntu ]] || [[ "$OS" =~ Debian ]] || [[ "$OS" =~ Devuan ]]; then
302314
qm guest exec "$VM" -- bash -c "apt-get update" >/dev/null 2>&1
303315
SECURITY_APT_UPDATES=$(qm guest exec "$VM" -- bash -c "apt-get -s upgrade | grep -ci ^inst.*security | tr -d '\n'" | tail -n +4 | head -n -1 | cut -c 18- | rev | cut -c 2- | rev)

install.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,10 @@
44
# Install #
55
###########
66

7+
# shellcheck disable=SC1017
78
# shellcheck disable=SC2034
8-
VERSION="1.8"
9+
10+
VERSION="1.8.3"
911

1012
# Branch
1113
BRANCH="master"
@@ -245,6 +247,7 @@ UPDATE () {
245247
# Copy files
246248
mv "$TEMP_FILES"/update.sh $LOCAL_FILES/update.sh
247249
chmod 750 $LOCAL_FILES/update.sh
250+
mv "$TEMP_FILES"/VMs/example $LOCAL_FILES/VMs/example
248251
if [[ -f /etc/update-motd.d/01-welcome-screen ]]; then
249252
mv "$TEMP_FILES"/welcome-screen.sh /etc/update-motd.d/01-welcome-screen
250253
chmod +x /etc/update-motd.d/01-welcome-screen
@@ -262,6 +265,8 @@ UPDATE () {
262265
rm -rf "$TEMP_FILES"/change.log || true
263266
rm -rf "$TEMP_FILES"/install.sh || true
264267
rm -rf "$TEMP_FILES"/ssh.md || true
268+
rm -rf "$TEMP_FILES"/CODE_OF_CONDUCT.md || true
269+
rm -rf "$TEMP_FILES"/SECURITY.md || true
265270
chmod -R +x "$TEMP_FILES"/exit/*.sh
266271
cd "$TEMP_FILES"
267272
FILES="*.* **/*.*"

ssh.md

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,36 @@ PermitRootLogin yes
2929
`sudo service sshd restart`
3030

3131

32-
### IN HOST:
33-
- create one file per VM in `/etc/ultimate-updater/VMs/<ID>` with content:
32+
### IN HOST who hosted the VM:
33+
- Copy ssh key to VM:
34+
`ssh-copy-id -i /root/.ssh/id_rsa.pub root@<VM-IP>`
35+
36+
- or, if used user is not root:
37+
`ssh-copy-id -i /root/.ssh/id_rsa.pub <user>@<VM-IP>`
3438

35-
`IP="111.111.111.111"` # use the IP from the VM!
3639

40+
### IN HOST where ultimate-updater start:
41+
- create one file per VM in `/etc/ultimate-updater/VMs/<ID>` with content:
42+
43+
```
44+
IP="111.111.111.111" # use the IP from the VM!
45+
USER="root"
46+
SSH_VM_PORT="22"
47+
SSH_START_DELAY_TIME="45"
48+
```
3749
(IP can be found in VM with command: `hostname -I`)
3850

39-
- Copy ssh key to VM:
4051

41-
You need to make this step on the Host, who hosted the VM. If pve2 host VMxyz, you need to make the copy from pve2, not from the pve, on which you run the script ;)
52+
## If user is NOT root, you need to prepare the user, to run admin commands - like `apt` - but user MUST be part of group `sudo`
4253

43-
`ssh-copy-id -i /root/.ssh/id_rsa.pub root@<VM-IP>`
54+
Example for Ubuntu/Debian - with sudo (change in VM):
55+
56+
- `sudo visudo`
57+
- add this to file:
58+
59+
`%sudo ALL=(root) NOPASSWD: /usr/bin/apt-get update, /usr/bin/apt-get upgrade -y, /usr/bin/apt-get --purge autoremove -y, /usr/bin/apt-get autoclean -y`
60+
- save and exit file
61+
62+
Sources:
63+
- easy, but unsafe -> look [here](https://askubuntu.com/questions/74054/run-apt-get-without-sudo)
64+
- for more safety -> look [here](https://stackoverflow.com/questions/73397309/how-do-i-enable-passwordless-sudo-for-all-options-for-a-command):

0 commit comments

Comments
 (0)