Added Wiki for all the docs from Egor

This commit is contained in:
ZennDev1337 2023-12-21 13:08:27 +01:00
parent 741584446c
commit e9058bb2cb
5 changed files with 1065 additions and 0 deletions

View file

@ -0,0 +1,19 @@
The main distributions are available under: **_Node>local>CT Templates>Templates_**
The containers with applications are available under:
```
pveam update && pveam available
```
to download:
```
pveam download local debian-10-turnkey-wireguard_16.2-1_amd64.tar.gz
```
to list all downloaded container:
```
pveam list local
```

View file

@ -0,0 +1,32 @@
### Code:
```
#!/bin/bash
# update all containers
# list of container ids we need to iterate through
containers=$(pct list | tail -n +2 | cut -f1 -d' ')
function update_container() {
container=$1
echo "[Info] Updating $container"
# to chain commands within one exec we will need to wrap them in bash
pct exec $container -- bash -c "apt update && apt upgrade -y && apt autoremove -y"
}
for container in $containers
do
status=`pct status $container`
if [ "$status" == "status: stopped" ]; then
echo [Info] Starting $container
pct start $container
echo [Info] Sleeping 5 seconds
sleep 5
update_container $container
echo [Info] Shutting down $container
pct shutdown $container &
elif [ "$status" == "status: running" ]; then
update_container $container
fi
done; wait
```