Compare commits

...

17 Commits

Author SHA1 Message Date
Rémi Bédard-Couture
6b6817a10a
Merge 610eff3d2a into c4580100a8 2025-01-19 17:16:06 +07:00
bvdberg01
c4580100a8
Fix updater (#1572) 2025-01-19 11:16:01 +01:00
community-scripts-pr-app[bot]
f8f166e26f
Update CHANGELOG.md (#1577)
Some checks are pending
Auto Update .app-headers / update-app-headers (push) Waiting to run
Shellcheck / Shellcheck (push) Waiting to run
Create Changelog Pull Request / update-changelog-pull-request (push) Waiting to run
Frontend CI/CD / build (push) Waiting to run
Frontend CI/CD / deploy (push) Blocked by required conditions
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-01-18 21:12:13 +01:00
CanbiZ
b97d40bf5a
update 2025-01-18 21:11:26 +01:00
CanbiZ
0e443536cc
update 2025-01-18 21:07:19 +01:00
community-scripts-pr-app[bot]
0b73d9f689
[Github Action] Update CHANGELOG.md (#1573)
* Update CHANGELOG.md

* update

* update

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: CanbiZ <47820557+MickLesk@users.noreply.github.com>
2025-01-18 20:57:47 +01:00
Egon
5c11b67507
added cifs support in ubuntu2404-vm.sh (#1461)
added cifs to 
case $STORAGE_TYPE in
nfs | dir | cifs)

So VMs can be deployed on cifs shares
2025-01-18 20:54:43 +01:00
CanbiZ
2f20db8a42
breaking change: homeassistant upgrade os and python3 (#1550)
* breaking change: homeassistant upgrade os and python3

* update json to new date and new ressource values
2025-01-18 20:54:11 +01:00
community-scripts-pr-app[bot]
b04dc0261b
Update CHANGELOG.md (#1566)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-01-18 19:14:34 +01:00
github-actions[bot]
81b271a9ef
Update .app-headers file (#1567)
Some checks are pending
Auto Update .app-headers / update-app-headers (push) Waiting to run
Shellcheck / Shellcheck (push) Waiting to run
Create Changelog Pull Request / update-changelog-pull-request (push) Waiting to run
2025-01-18 13:30:09 +01:00
Max Slotov
75590a8ff8
[jellyseerr] Update nodejs if not up-to-date (#1563)
* [jellyseerr] Update nodejs if not up-to-date

* simplify if
2025-01-18 11:39:23 +01:00
Gerhard Burger
d1f5556ce3
Fix linkwarden update (#1565) 2025-01-18 11:39:02 +01:00
community-scripts-pr-app[bot]
e683fd900f
Update CHANGELOG.md (#1547)
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
2025-01-18 09:00:29 +01:00
CanbiZ
643e0f5ac8
Update CHANGELOG.md 2025-01-18 08:57:56 +01:00
oOStroudyOo
bd301942c5
Update VM Tags (#1562)
* haos-vm.sh tag

* debian-vm.sh tag

* Update mikrotik-routeros.sh tag

* Update nextcloud-vm.sh tag

* Update openwrt.sh tag

* Update owncloud-vm.sh tag

* Update ubuntu2204-vm.sh tag

* Update ubuntu2404-vm.sh tag

* Add pimox-haos-vm.sh tag

* Undo add tag

Unable to test
2025-01-18 08:03:51 +01:00
Rémi Bédard-Couture
610eff3d2a Only read from the environment file. Users should manually edit the file. 2025-01-03 17:07:04 -05:00
Rémi Bédard-Couture
0e3a648f40 Support for helper-scripts environment variables 2024-12-18 11:00:22 -05:00
19 changed files with 130 additions and 66 deletions

View File

@ -2,6 +2,7 @@
# Community Scripts Contribution Guide # Community Scripts Contribution Guide
## **Welcome to the communty-scripts Repository!** ## **Welcome to the communty-scripts Repository!**
📜 These documents outline the essential coding standards for all our scripts and JSON files. Adhering to these standards ensures that our codebase remains consistent, readable, and maintainable. By following these guidelines, we can improve collaboration, reduce errors, and enhance the overall quality of our project. 📜 These documents outline the essential coding standards for all our scripts and JSON files. Adhering to these standards ensures that our codebase remains consistent, readable, and maintainable. By following these guidelines, we can improve collaboration, reduce errors, and enhance the overall quality of our project.
### Why Coding Standards Matter ### Why Coding Standards Matter

View File

@ -16,10 +16,24 @@ All LXC instances created using this repository come pre-installed with Midnight
> [!IMPORTANT] > [!IMPORTANT]
Do not break established syntax in this file, as it is automatically updated by a Github Workflow Do not break established syntax in this file, as it is automatically updated by a Github Workflow
## 2025-01-17
## 2025-01-18
### Changed ### Changed
### 💥 Breaking Changes
- **READ GUIDE FIRST** breaking change: Homeassistant-Core upgrade os and python3 [@MickLesk](https://github.com/MickLesk) ([#1550](https://github.com/community-scripts/ProxmoxVE/pull/1550))
- Update Openwrt: Delete lines that do WAN input and forward accept [@chackl1990](https://github.com/chackl1990) ([#1540](https://github.com/community-scripts/ProxmoxVE/pull/1540))
### 🚀 Updated Scripts
- added cifs support in ubuntu2404-vm.sh [@plonxyz](https://github.com/plonxyz) ([#1461](https://github.com/community-scripts/ProxmoxVE/pull/1461))
- Fix linkwarden update [@burgerga](https://github.com/burgerga) ([#1565](https://github.com/community-scripts/ProxmoxVE/pull/1565))
- [jellyseerr] Update nodejs if not up-to-date [@makstech](https://github.com/makstech) ([#1563](https://github.com/community-scripts/ProxmoxVE/pull/1563))
- Update VM Tags [@oOStroudyOo](https://github.com/oOStroudyOo) ([#1562](https://github.com/community-scripts/ProxmoxVE/pull/1562))
- Update apt-cacher-ng.sh: Typo/Missing $ [@michelroegl-brunner](https://github.com/michelroegl-brunner) ([#1545](https://github.com/community-scripts/ProxmoxVE/pull/1545))
## 2025-01-16 ## 2025-01-16
### Changed ### Changed

View File

@ -1,7 +1,7 @@
#!/usr/bin/env bash #!/usr/bin/env bash
source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func) source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
# Copyright (c) 2021-2025 tteck # Copyright (c) 2021-2025 community-scripts ORG
# Author: tteck (tteckster) # Author: tteck (tteckster) | Co-Author: MickLesk (CanbiZ)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE # License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://www.home-assistant.io/ # Source: https://www.home-assistant.io/
@ -9,10 +9,10 @@ source <(curl -s https://raw.githubusercontent.com/community-scripts/ProxmoxVE/m
APP="Home Assistant-Core" APP="Home Assistant-Core"
var_tags="automation;smarthome" var_tags="automation;smarthome"
var_cpu="2" var_cpu="2"
var_ram="1024" var_ram="2048"
var_disk="8" var_disk="10"
var_os="ubuntu" var_os="ubuntu"
var_version="24.04" var_version="24.10"
var_unprivileged="1" var_unprivileged="1"
# App Output & Base Settings # App Output & Base Settings
@ -26,6 +26,13 @@ catch_errors
function update_script() { function update_script() {
header_info header_info
# OS Check
if ! lsb_release -d | grep -q "Ubuntu 24.10"; then
msg_error "Wrong OS detected. This script only supports Ubuntu 24.10."
msg_error "Read Guide: https://github.com/community-scripts/ProxmoxVE/discussions/1549"
exit 1
fi
check_container_storage check_container_storage
check_container_resources check_container_resources
if [[ ! -d /srv/homeassistant ]]; then if [[ ! -d /srv/homeassistant ]]; then
@ -51,17 +58,13 @@ function update_script() {
echo -e "${GN}Updating to Stable Version${CL}" echo -e "${GN}Updating to Stable Version${CL}"
BR="" BR=""
fi fi
if [[ "$PY" =~ ^python3\.(11|12)\.[0-9]+$ ]]; then
echo -e "⚠️ Home Assistant will soon require Python 3.13.x";
fi
msg_info "Stopping Home Assistant" msg_info "Stopping Home Assistant"
systemctl stop homeassistant systemctl stop homeassistant
msg_ok "Stopped Home Assistant" msg_ok "Stopped Home Assistant"
msg_info "Updating Home Assistant" msg_info "Updating Home Assistant"
source /srv/homeassistant/bin/activate source /srv/homeassistant/bin/activate
uv pip install ${BR}--upgrade homeassistant &>/dev/null pip install ${BR}--upgrade homeassistant &>/dev/null
msg_ok "Updated Home Assistant" msg_ok "Updated Home Assistant"
msg_info "Starting Home Assistant" msg_info "Starting Home Assistant"
@ -75,7 +78,7 @@ function update_script() {
if [ "$UPD" == "2" ]; then if [ "$UPD" == "2" ]; then
msg_info "Installing Home Assistant Community Store (HACS)" msg_info "Installing Home Assistant Community Store (HACS)"
apt update &>/dev/null apt update &>/dev/null
apt install unzip &>/dev/null apt install -y unzip &>/dev/null
cd .homeassistant cd .homeassistant
bash <(curl -fsSL https://get.hacs.xyz) &>/dev/null bash <(curl -fsSL https://get.hacs.xyz) &>/dev/null
msg_ok "Installed Home Assistant Community Store (HACS)" msg_ok "Installed Home Assistant Community Store (HACS)"
@ -102,16 +105,19 @@ function update_script() {
msg_ok "Installed FileBrowser" msg_ok "Installed FileBrowser"
msg_info "Creating Service" msg_info "Creating Service"
service_path="/etc/systemd/system/filebrowser.service" cat <<EOF > /etc/systemd/system/filebrowser.service
echo "[Unit] [Unit]
Description=Filebrowser Description=Filebrowser
After=network-online.target After=network-online.target
[Service] [Service]
User=root User=root
WorkingDirectory=/root/ WorkingDirectory=/root/
ExecStart=/usr/local/bin/filebrowser -r /root/.homeassistant ExecStart=/usr/local/bin/filebrowser -r /root/.homeassistant
[Install] [Install]
WantedBy=default.target" >$service_path WantedBy=default.target
EOF
systemctl enable --now -q filebrowser.service systemctl enable --now -q filebrowser.service
msg_ok "Created Service" msg_ok "Created Service"

View File

@ -34,6 +34,22 @@ function update_script() {
exit exit
fi fi
if [ "$(node -v | cut -c2-3)" -ne 22 ]; then
msg_info "Updating Node.js Repository"
echo "deb [signed-by=/etc/apt/keyrings/nodesource.gpg] https://deb.nodesource.com/node_22.x nodistro main" >/etc/apt/sources.list.d/nodesource.list
msg_ok "Updating Node.js Repository"
msg_info "Updating Packages"
apt-get update &>/dev/null
apt-get -y upgrade &>/dev/null
msg_ok "Updating Packages"
msg_info "Cleaning up"
apt-get -y autoremove
apt-get -y autoclean
msg_ok "Cleaning up"
fi
if ! command -v pnpm &> /dev/null; then if ! command -v pnpm &> /dev/null; then
msg_error "pnpm not found. Installing..." msg_error "pnpm not found. Installing..."
npm install -g pnpm &>/dev/null npm install -g pnpm &>/dev/null

View File

@ -40,6 +40,7 @@ function update_script() {
msg_info "Updating ${APP} to ${RELEASE}" msg_info "Updating ${APP} to ${RELEASE}"
cd /opt cd /opt
mv /opt/linkwarden/.env /opt/.env mv /opt/linkwarden/.env /opt/.env
rm -rf /opt/linkwarden
RELEASE=$(curl -s https://api.github.com/repos/linkwarden/linkwarden/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }') RELEASE=$(curl -s https://api.github.com/repos/linkwarden/linkwarden/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
wget -q "https://github.com/linkwarden/linkwarden/archive/refs/tags/${RELEASE}.zip" wget -q "https://github.com/linkwarden/linkwarden/archive/refs/tags/${RELEASE}.zip"
unzip -q ${RELEASE}.zip unzip -q ${RELEASE}.zip
@ -59,7 +60,6 @@ function update_script() {
msg_ok "Started ${APP}" msg_ok "Started ${APP}"
msg_info "Cleaning up" msg_info "Cleaning up"
rm -rf /opt/${RELEASE}.zip rm -rf /opt/${RELEASE}.zip
rm -rf /opt/linkwarden_bak
msg_ok "Cleaned" msg_ok "Cleaned"
msg_ok "Updated Successfully" msg_ok "Updated Successfully"
else else

View File

@ -32,29 +32,35 @@ function update_script() {
msg_error "No ${APP} Installation Found!" msg_error "No ${APP} Installation Found!"
exit exit
fi fi
RELEASE=$(curl -s https://api.github.com/repos/thomiceli/opengist/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
msg_info "Stopping Service" msg_info "Stopping Service"
systemctl stop opengist.service systemctl stop opengist.service
msg_ok "Stopped Service" msg_ok "Stopped Service"
apt-get update &>/dev/null
apt-get upgrade &>/dev/null
RELEASE=$(curl -s https://api.github.com/repos/thomiceli/opengist/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
msg_info "Updating ${APP} to v${RELEASE}" msg_info "Updating ${APP} to v${RELEASE}"
apt-get update &>/dev/null
apt-get -y upgrade &>/dev/null
cd /opt cd /opt
wget -qO "https://github.com/thomiceli/opengist/releases/download/v${RELEASE}/opengist${RELEASE}-linux-amd64.tar.gz" mv /opt/opengist /opt/opengist-backup
rm -rf /opt/opengist wget -q "https://github.com/thomiceli/opengist/releases/download/v${RELEASE}/opengist${RELEASE}-linux-amd64.tar.gz"
tar -xzf opengist${RELEASE}-linux-amd64.tar.gz tar -xzf opengist${RELEASE}-linux-amd64.tar.gz
mv /opt/opengist-backup/config.yml /opt/opengist/config.yml
chmod +x /opt/opengist/opengist chmod +x /opt/opengist/opengist
echo "${RELEASE}" >"/opt/${APP}_version.txt" echo "${RELEASE}" >"/opt/${APP}_version.txt"
rm -rf /opt/opengist${RELEASE}-linux-amd64.tar.gz
apt-get -y autoremove &>/dev/null
apt-get -y autoclean &>/dev/null
msg_ok "Updated ${APP} LXC" msg_ok "Updated ${APP} LXC"
msg_info "Starting Service" msg_info "Starting Service"
systemctl start opengist.service systemctl start opengist.service
msg_ok "Started Service" msg_ok "Started Service"
msg_info "Cleaning up"
rm -rf /opt/opengist${RELEASE}-linux-amd64.tar.gz
rm -rf /opt/opengist-backup
apt-get -y autoremove &>/dev/null
apt-get -y autoclean &>/dev/null
msg_ok "Cleaned"
msg_ok "Updated Successfully"
else else
msg_ok "No update required. ${APP} is already at v${RELEASE}." msg_ok "No update required. ${APP} is already at v${RELEASE}."
fi fi

View File

@ -44,34 +44,36 @@ $STD apt-get install -y \
libavfilter-dev \ libavfilter-dev \
libmariadb-dev-compat \ libmariadb-dev-compat \
libatlas-base-dev \ libatlas-base-dev \
software-properties-common software-properties-common \
libmariadb-dev \
pkg-config
msg_ok "Installed Dependencies" msg_ok "Installed Dependencies"
msg_info "Setup Python3" msg_info "Setup Python3/pip"
$STD add-apt-repository -y ppa:deadsnakes/ppa
$STD apt-get update $STD apt-get update
$STD rm -rf /usr/lib/python3.*/EXTERNALLY-MANAGED
$STD apt-get remove --purge -y python3.12 python3.12-dev python3.12-venv
$STD apt-get install -y \ $STD apt-get install -y \
python3.13-* \ python3.13 \
python3-pip \ python3-pip \
python3.13-dev \ python3.13-dev \
python3.13-venv python3.13-venv
msg_ok "Setup Python3"
msg_info "Installing UV" ln -sf /usr/bin/python3.13 /usr/bin/python3
$STD pip install uv msg_ok "Setup Python3"
msg_ok "Installed UV"
msg_info "Setting up Home Assistant-Core environment" msg_info "Setting up Home Assistant-Core environment"
mkdir /srv/homeassistant mkdir /srv/homeassistant
cd /srv/homeassistant cd /srv/homeassistant
uv venv . &>/dev/null python3 -m venv .
source bin/activate source bin/activate
msg_ok "Created virtual environment with UV" msg_ok "Created virtual environment"
msg_info "Installing Home Assistant-Core and packages" msg_info "Installing Home Assistant-Core"
$STD uv pip install webrtcvad wheel homeassistant mysqlclient psycopg2-binary isal $STD python3 -m pip install webrtcvad wheel homeassistant mysqlclient psycopg2-binary isal
mkdir -p /root/.homeassistant mkdir -p /root/.homeassistant
msg_ok "Installed Home Assistant-Core and required packages" msg_ok "Installed Home Assistant-Core"
msg_info "Creating Service" msg_info "Creating Service"
cat <<EOF >/etc/systemd/system/homeassistant.service cat <<EOF >/etc/systemd/system/homeassistant.service

View File

@ -4,7 +4,7 @@
"categories": [ "categories": [
2 2
], ],
"date_created": "2024-04-29", "date_created": "2025-01-17",
"type": "ct", "type": "ct",
"updateable": true, "updateable": true,
"privileged": false, "privileged": false,
@ -19,10 +19,10 @@
"script": "ct/homeassistant-core.sh", "script": "ct/homeassistant-core.sh",
"resources": { "resources": {
"cpu": 2, "cpu": 2,
"ram": 1024, "ram": 2048,
"hdd": 8, "hdd": 10,
"os": "ubuntu", "os": "ubuntu",
"version": "24.04" "version": "24.10"
} }
} }
], ],
@ -40,7 +40,7 @@
"type": "warning" "type": "warning"
}, },
{ {
"text": "Use Ubuntu 24.04 ONLY", "text": "Use Ubuntu 24.10 ONLY",
"type": "warning" "type": "warning"
}, },
{ {

View File

@ -6,7 +6,7 @@
], ],
"date_created": "2025-01-14", "date_created": "2025-01-14",
"type": "ct", "type": "ct",
"updateable": false, "updateable": true,
"privileged": false, "privileged": false,
"interface_port": 6157, "interface_port": 6157,
"documentation": null, "documentation": null,

View File

@ -1,4 +1,4 @@
### Generated on 01-16-2025 ### Generated on 01-18-2025
################################################## ##################################################
### 2fauth.sh ### 2fauth.sh

View File

@ -531,7 +531,7 @@ advanced_settings() {
if [ "$NET" != "dhcp" ]; then if [ "$NET" != "dhcp" ]; then
while true; do while true; do
GATE1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Enter gateway IP address" 8 58 --title "Gateway IP" 3>&1 1>&2 2>&3) GATE1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Enter gateway IP address" 8 58 $GATE1 --title "Gateway IP" 3>&1 1>&2 2>&3)
if [ -z "$GATE1" ]; then if [ -z "$GATE1" ]; then
whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox "Gateway IP address cannot be empty" 8 58 whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox "Gateway IP address cannot be empty" 8 58
elif [[ ! "$GATE1" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}$ ]]; then elif [[ ! "$GATE1" =~ ^([0-9]{1,3}\.){3}[0-9]{1,3}$ ]]; then
@ -551,7 +551,7 @@ advanced_settings() {
APT_CACHER="" APT_CACHER=""
APT_CACHER_IP="" APT_CACHER_IP=""
else else
if APT_CACHER_IP=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set APT-Cacher IP (leave blank for default)" 8 58 --title "APT-Cacher IP" 3>&1 1>&2 2>&3); then if APT_CACHER_IP=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set APT-Cacher IP (leave blank for default)" 8 58 $APT_CACHER_IP --title "APT-Cacher IP" 3>&1 1>&2 2>&3); then
APT_CACHER="${APT_CACHER_IP:+yes}" APT_CACHER="${APT_CACHER_IP:+yes}"
echo -e "${NETWORK}${BOLD}${DGN}APT-Cacher IP Address: ${BGN}${APT_CACHER_IP:-Default}${CL}" echo -e "${NETWORK}${BOLD}${DGN}APT-Cacher IP Address: ${BGN}${APT_CACHER_IP:-Default}${CL}"
else else
@ -566,7 +566,7 @@ advanced_settings() {
fi fi
echo -e "${DISABLEIPV6}${BOLD}${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}" echo -e "${DISABLEIPV6}${BOLD}${DGN}Disable IPv6: ${BGN}$DISABLEIP6${CL}"
if MTU1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 --title "MTU SIZE" 3>&1 1>&2 2>&3); then if MTU1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Interface MTU Size (leave blank for default)" 8 58 $MTU1 --title "MTU SIZE" 3>&1 1>&2 2>&3); then
if [ -z $MTU1 ]; then if [ -z $MTU1 ]; then
MTU1="Default" MTU1="Default"
MTU="" MTU=""
@ -578,7 +578,7 @@ advanced_settings() {
exit_script exit_script
fi fi
if SD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 --title "DNS Search Domain" 3>&1 1>&2 2>&3); then if SD=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a DNS Search Domain (leave blank for HOST)" 8 58 $SD --title "DNS Search Domain" 3>&1 1>&2 2>&3); then
if [ -z $SD ]; then if [ -z $SD ]; then
SX=Host SX=Host
SD="" SD=""
@ -591,7 +591,7 @@ advanced_settings() {
exit_script exit_script
fi fi
if NX=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then if NX=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a DNS Server IP (leave blank for HOST)" 8 58 $NX --title "DNS SERVER IP" 3>&1 1>&2 2>&3); then
if [ -z $NX ]; then if [ -z $NX ]; then
NX=Host NX=Host
NS="" NS=""
@ -615,7 +615,7 @@ advanced_settings() {
exit_script exit_script
fi fi
if VLAN1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Vlan(leave blank for default)" 8 58 --title "VLAN" 3>&1 1>&2 2>&3); then if VLAN1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set a Vlan(leave blank for default)" 8 58 $VLAN1 --title "VLAN" 3>&1 1>&2 2>&3); then
if [ -z $VLAN1 ]; then if [ -z $VLAN1 ]; then
VLAN1="Default" VLAN1="Default"
VLAN="" VLAN=""
@ -687,6 +687,7 @@ install_script() {
root_check root_check
arch_check arch_check
ssh_check ssh_check
read_proxmox_helper_scripts_env
if systemctl is-active -q ping-instances.service; then if systemctl is-active -q ping-instances.service; then
systemctl -q stop ping-instances.service systemctl -q stop ping-instances.service
@ -955,3 +956,21 @@ EOF
systemctl start ping-instances.service systemctl start ping-instances.service
fi fi
} }
# Set a global variable for the PHS environment file
PVE_ENV="/etc/pve-helper-scripts.conf"
# This function loads the environment file for common configuration in Proxmox-Helper-Scripts
function read_proxmox_helper_scripts_env(){
#Check if file exists
if [ ! -f "$PVE_ENV" ]; then
msg_info "${BL}Creating Proxmox-Helper-Scripts configuration file.${CL}"
touch "$PVE_ENV"
chown root:root "$PVE_ENV"
chmod 0600 "$PVE_ENV"
msg_ok "${BL}Created Proxmox-Helper-Scripts configuration file.${CL}"
else
source "$PVE_ENV"
fi
}

View File

@ -402,7 +402,7 @@ done
msg_info "Creating a Debian 12 VM" msg_info "Creating a Debian 12 VM"
qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios ovmf${CPU_TYPE} -cores $CORE_COUNT -memory $RAM_SIZE \ qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios ovmf${CPU_TYPE} -cores $CORE_COUNT -memory $RAM_SIZE \
-name $HN -tags proxmox-helper-scripts -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci -name $HN -tags community-script -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci
pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null
qm importdisk $VMID ${FILE} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null qm importdisk $VMID ${FILE} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null
qm set $VMID \ qm set $VMID \

View File

@ -444,7 +444,7 @@ done
msg_ok "Extracted KVM Disk Image" msg_ok "Extracted KVM Disk Image"
msg_info "Creating HAOS VM" msg_info "Creating HAOS VM"
qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios ovmf${CPU_TYPE} -cores $CORE_COUNT -memory $RAM_SIZE \ qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios ovmf${CPU_TYPE} -cores $CORE_COUNT -memory $RAM_SIZE \
-name $HN -tags proxmox-helper-scripts -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci -name $HN -tags community-script -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci
pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null
qm importdisk $VMID ${FILE%.*} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null qm importdisk $VMID ${FILE%.*} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null
qm set $VMID \ qm set $VMID \

View File

@ -269,7 +269,7 @@ DISK_REF="${STORAGE}:${DISK_REF:-}${DISK_VAR:-}"
msg_ok "Extracted Mikrotik RouterOS CHR Disk Image" msg_ok "Extracted Mikrotik RouterOS CHR Disk Image"
msg_info "Creating Mikrotik RouterOS CHR VM" msg_info "Creating Mikrotik RouterOS CHR VM"
qm create $VMID -tablet 0 -localtime 1 -cores $CORE_COUNT -memory $RAM_SIZE -name $HN \ qm create $VMID -tablet 0 -localtime 1 -cores $CORE_COUNT -memory $RAM_SIZE -name $HN \
-tags proxmox-helper-scripts -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU \ -tags community-script -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU \
-onboot 1 -ostype l26 -scsihw virtio-scsi-pci -onboot 1 -ostype l26 -scsihw virtio-scsi-pci
qm importdisk $VMID ${FILE%.*} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null qm importdisk $VMID ${FILE%.*} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null
qm set $VMID \ qm set $VMID \

View File

@ -401,7 +401,7 @@ done
msg_info "Creating a $NAME" msg_info "Creating a $NAME"
qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios seabios${CPU_TYPE} -cores $CORE_COUNT -memory $RAM_SIZE \ qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios seabios${CPU_TYPE} -cores $CORE_COUNT -memory $RAM_SIZE \
-name $HN -tags proxmox-helper-scripts -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci -name $HN -tags community-script -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci
pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null
pvesm alloc $STORAGE $VMID $DISK1 12G 1>&/dev/null pvesm alloc $STORAGE $VMID $DISK1 12G 1>&/dev/null
qm importdisk $VMID ${FILE} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null qm importdisk $VMID ${FILE} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null

View File

@ -475,7 +475,7 @@ qm set $VMID \
-efidisk0 ${DISK0_REF},efitype=4m,size=4M \ -efidisk0 ${DISK0_REF},efitype=4m,size=4M \
-scsi0 ${DISK1_REF},size=512M \ -scsi0 ${DISK1_REF},size=512M \
-boot order=scsi0 \ -boot order=scsi0 \
-tags proxmox-helper-scripts \ -tags community-script \
-description "<div align='center'><a href='https://Helper-Scripts.com'><img src='https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/images/logo-81x112.png'/></a> -description "<div align='center'><a href='https://Helper-Scripts.com'><img src='https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/images/logo-81x112.png'/></a>
# OpenWRT # OpenWRT

View File

@ -401,7 +401,7 @@ done
msg_info "Creating a $NAME" msg_info "Creating a $NAME"
qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios seabios${CPU_TYPE} -cores $CORE_COUNT -memory $RAM_SIZE \ qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios seabios${CPU_TYPE} -cores $CORE_COUNT -memory $RAM_SIZE \
-name $HN -tags proxmox-helper-scripts -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci -name $HN -tags community-script -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci
pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null
pvesm alloc $STORAGE $VMID $DISK1 12G 1>&/dev/null pvesm alloc $STORAGE $VMID $DISK1 12G 1>&/dev/null
qm importdisk $VMID ${FILE} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null qm importdisk $VMID ${FILE} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null

View File

@ -402,7 +402,7 @@ done
msg_info "Creating a Ubuntu 22.04 VM" msg_info "Creating a Ubuntu 22.04 VM"
qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios ovmf${CPU_TYPE} -cores $CORE_COUNT -memory $RAM_SIZE \ qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios ovmf${CPU_TYPE} -cores $CORE_COUNT -memory $RAM_SIZE \
-name $HN -tags proxmox-helper-scripts -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci -name $HN -tags community-script -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci
pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null
qm importdisk $VMID ${FILE} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null qm importdisk $VMID ${FILE} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null
qm set $VMID \ qm set $VMID \

View File

@ -370,7 +370,7 @@ msg_ok "Downloaded ${CL}${BL}${FILE}${CL}"
STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}') STORAGE_TYPE=$(pvesm status -storage $STORAGE | awk 'NR>1 {print $2}')
case $STORAGE_TYPE in case $STORAGE_TYPE in
nfs | dir) nfs | dir | cifs)
DISK_EXT=".qcow2" DISK_EXT=".qcow2"
DISK_REF="$VMID/" DISK_REF="$VMID/"
DISK_IMPORT="-format qcow2" DISK_IMPORT="-format qcow2"
@ -392,7 +392,7 @@ done
msg_info "Creating a Ubuntu 24.04 VM" msg_info "Creating a Ubuntu 24.04 VM"
qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios ovmf${CPU_TYPE} -cores $CORE_COUNT -memory $RAM_SIZE \ qm create $VMID -agent 1${MACHINE} -tablet 0 -localtime 1 -bios ovmf${CPU_TYPE} -cores $CORE_COUNT -memory $RAM_SIZE \
-name $HN -tags proxmox-helper-scripts -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci -name $HN -tags community-script -net0 virtio,bridge=$BRG,macaddr=$MAC$VLAN$MTU -onboot 1 -ostype l26 -scsihw virtio-scsi-pci
pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null pvesm alloc $STORAGE $VMID $DISK0 4M 1>&/dev/null
qm importdisk $VMID ${FILE} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null qm importdisk $VMID ${FILE} $STORAGE ${DISK_IMPORT:-} 1>&/dev/null
qm set $VMID \ qm set $VMID \