forked from forkanization/Proxmox-arm64
Merge remote-tracking branch 'upstream/main'
This commit is contained in:
@@ -10,6 +10,15 @@
|
||||
- All LXC instances created using this repository come pre-installed with Midnight Commander, which is a command-line tool (`mc`) that offers a user-friendly file and directory management interface for the terminal environment.
|
||||
- 🚨 **The scripts in the repository will no longer provide support for Proxmox VE 7 starting from July 2024 (scripts will not execute on PVE7). Subsequent <a href='https://forum.proxmox.com/threads/proxmox-ve-support-lifecycle.35755/' target='_blank' rel='noopener noreferrer'>Proxmox VE - Support Lifecycle</a>**
|
||||
|
||||
## 2024-04-24
|
||||
|
||||
### Changed
|
||||
|
||||
- **Traccar LXC**
|
||||
- NEW Script
|
||||
- **Calibre-Web LXC**
|
||||
- NEW Script
|
||||
|
||||
## 2024-04-21
|
||||
|
||||
### Changed
|
||||
|
||||
@@ -55,26 +55,31 @@ function default_settings() {
|
||||
function update_script() {
|
||||
header_info
|
||||
if [[ ! -d /opt/homepage ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
|
||||
if [[ "$(node -v | cut -d 'v' -f 2)" == "18."* ]]; then
|
||||
if ! command -v npm >/dev/null 2>&1; then
|
||||
echo "Installing NPM..."
|
||||
apt-get install -y npm >/dev/null 2>&1
|
||||
echo "Installed NPM..."
|
||||
fi
|
||||
if [[ "$(node -v | cut -d 'v' -f 2)" == "18."* ]]; then
|
||||
if ! command -v npm >/dev/null 2>&1; then
|
||||
echo "Installing NPM..."
|
||||
apt-get install -y npm >/dev/null 2>&1
|
||||
npm install -g pnpm >/dev/null 2>&1
|
||||
echo "Installed NPM..."
|
||||
fi
|
||||
fi
|
||||
RELEASE=$(curl -s https://api.github.com/repos/gethomepage/homepage/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
msg_info "Updating Homepage to v${RELEASE} (Patience)"
|
||||
systemctl stop homepage
|
||||
wget -q https://github.com/gethomepage/homepage/archive/refs/tags/v${RELEASE}.tar.gz
|
||||
tar -xzf v${RELEASE}.tar.gz
|
||||
cp -r homepage-${RELEASE}/* /opt/homepage/
|
||||
rm -rf homepage-${RELEASE}
|
||||
cd /opt/homepage
|
||||
npx update-browserslist-db@latest
|
||||
pnpm install
|
||||
pnpm build
|
||||
systemctl start homepage
|
||||
msg_ok "Updated Homepage to v${RELEASE}"
|
||||
if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then
|
||||
msg_info "Updating Homepage to v${RELEASE} (Patience)"
|
||||
systemctl stop homepage
|
||||
wget -q https://github.com/gethomepage/homepage/archive/refs/tags/v${RELEASE}.tar.gz
|
||||
tar -xzf v${RELEASE}.tar.gz
|
||||
cp -r homepage-${RELEASE}/* /opt/homepage/
|
||||
rm -rf homepage-${RELEASE}
|
||||
cd /opt/homepage
|
||||
npx update-browserslist-db@latest
|
||||
pnpm install
|
||||
pnpm build
|
||||
systemctl start homepage
|
||||
msg_ok "Updated Homepage to v${RELEASE}"
|
||||
else
|
||||
msg_ok "No update required. ${APP} is already at ${RELEASE}"
|
||||
fi
|
||||
exit
|
||||
}
|
||||
|
||||
|
||||
69
ct/traccar.sh
Normal file
69
ct/traccar.sh
Normal file
@@ -0,0 +1,69 @@
|
||||
#!/usr/bin/env bash
|
||||
source <(curl -s https://raw.githubusercontent.com/asylumexp/Proxmox/main/misc/build.func)
|
||||
# Copyright (c) 2021-2024 tteck
|
||||
# Author: tteck (tteckster)
|
||||
# License: MIT
|
||||
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
||||
|
||||
function header_info {
|
||||
clear
|
||||
cat <<"EOF"
|
||||
______
|
||||
/_ __/________ _______________ ______
|
||||
/ / / ___/ __ `/ ___/ ___/ __ `/ ___/
|
||||
/ / / / / /_/ / /__/ /__/ /_/ / /
|
||||
/_/ /_/ \__,_/\___/\___/\__,_/_/
|
||||
|
||||
EOF
|
||||
}
|
||||
header_info
|
||||
echo -e "Loading..."
|
||||
APP="Traccar"
|
||||
var_disk="2"
|
||||
var_cpu="1"
|
||||
var_ram="1024"
|
||||
var_os="debian"
|
||||
var_version="12"
|
||||
variables
|
||||
color
|
||||
catch_errors
|
||||
|
||||
function default_settings() {
|
||||
CT_TYPE="1"
|
||||
PW=""
|
||||
CT_ID=$NEXTID
|
||||
HN=$NSAPP
|
||||
DISK_SIZE="$var_disk"
|
||||
CORE_COUNT="$var_cpu"
|
||||
RAM_SIZE="$var_ram"
|
||||
BRG="vmbr0"
|
||||
NET="dhcp"
|
||||
GATE=""
|
||||
APT_CACHER=""
|
||||
APT_CACHER_IP=""
|
||||
DISABLEIP6="no"
|
||||
MTU=""
|
||||
SD=""
|
||||
NS=""
|
||||
MAC=""
|
||||
VLAN=""
|
||||
SSH="no"
|
||||
VERB="no"
|
||||
echo_default
|
||||
}
|
||||
|
||||
function update_script() {
|
||||
header_info
|
||||
if [[ ! -d /opt/traccar ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
|
||||
msg_error "There is currently no update path available."
|
||||
exit
|
||||
exit
|
||||
}
|
||||
|
||||
start
|
||||
build_container
|
||||
description
|
||||
|
||||
msg_ok "Completed Successfully!\n"
|
||||
echo -e "${APP} should be reachable by going to the following URL.
|
||||
${BL}http://${IP}:8082${CL} \n"
|
||||
@@ -23,6 +23,7 @@ $STD apt-get install -y gcc
|
||||
$STD apt-get install -y ca-certificates
|
||||
$STD apt-get install -y gnupg
|
||||
$STD apt-get install -y wget
|
||||
$STD apt-get install -y gpg
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
msg_info "Setting up Node.js Repository"
|
||||
@@ -48,11 +49,12 @@ cd /opt/homepage
|
||||
cp /opt/homepage/src/skeleton/* /opt/homepage/config
|
||||
$STD pnpm install
|
||||
$STD pnpm build
|
||||
echo "${RELEASE}" >/opt/${APPLICATION}_version.txt
|
||||
msg_ok "Installed Homepage v${RELEASE}"
|
||||
|
||||
msg_info "Creating Service"
|
||||
service_path="/etc/systemd/system/homepage.service"
|
||||
echo "[Unit]
|
||||
cat <<EOF >/etc/systemd/system/homepage.service
|
||||
[Unit]
|
||||
Description=Homepage
|
||||
After=network.target
|
||||
StartLimitIntervalSec=0
|
||||
@@ -64,8 +66,9 @@ User=root
|
||||
WorkingDirectory=/opt/homepage/
|
||||
ExecStart=pnpm start
|
||||
[Install]
|
||||
WantedBy=multi-user.target" >$service_path
|
||||
$STD systemctl enable --now homepage
|
||||
WantedBy=multi-user.target
|
||||
EOF
|
||||
systemctl enable -q --now homepage
|
||||
msg_ok "Created Service"
|
||||
|
||||
motd_ssh
|
||||
|
||||
37
install/traccar-install.sh
Normal file
37
install/traccar-install.sh
Normal file
@@ -0,0 +1,37 @@
|
||||
#!/usr/bin/env bash
|
||||
|
||||
# Copyright (c) 2021-2024 tteck
|
||||
# Author: tteck (tteckster)
|
||||
# License: MIT
|
||||
# https://github.com/tteck/Proxmox/raw/main/LICENSE
|
||||
|
||||
source /dev/stdin <<< "$FUNCTIONS_FILE_PATH"
|
||||
color
|
||||
verb_ip6
|
||||
catch_errors
|
||||
setting_up_container
|
||||
network_check
|
||||
update_os
|
||||
|
||||
msg_info "Installing Dependencies"
|
||||
$STD apt-get install -y curl
|
||||
$STD apt-get install -y sudo
|
||||
$STD apt-get install -y mc
|
||||
msg_ok "Installed Dependencies"
|
||||
|
||||
RELEASE=$(curl -s https://api.github.com/repos/traccar/traccar/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
|
||||
msg_info "Installing Traccar v${RELEASE}"
|
||||
wget -q https://github.com/traccar/traccar/releases/download/v${RELEASE}/traccar-linux-arm-${RELEASE}.zip
|
||||
$STD unzip traccar-linux-arm-${RELEASE}.zip
|
||||
$STD ./traccar.run
|
||||
systemctl enable -q --now traccar
|
||||
rm -rf README.txt traccar-linux-arm-${RELEASE}.zip traccar.run
|
||||
msg_ok "Installed Traccar v${RELEASE}"
|
||||
|
||||
motd_ssh
|
||||
customize
|
||||
|
||||
msg_info "Cleaning up"
|
||||
$STD apt-get autoremove
|
||||
$STD apt-get autoclean
|
||||
msg_ok "Cleaned"
|
||||
@@ -98,7 +98,7 @@ pve_check() {
|
||||
if [ $(pveversion | grep "pve-manager/8" | wc -l) -ne 1 ]; then
|
||||
whiptail --backtitle "Proxmox VE Helper Scripts" --msgbox --title "Proxmox VE 7 Detected" "You are currently using Proxmox VE 7 (EOL 2024-07), refrain from creating Debian 12 LXCs. \nDefault distribution for $APP LXC is ${var_os} ${var_version}" 10 60
|
||||
fi
|
||||
if ! pveversion | grep -Eq "pve-manager/(7.4-[1][3-9]|8.1.[1-9])"; then
|
||||
if ! pveversion | grep -Eq "pve-manager/(7\.4-(1[3-8])|8\.[1-2])"; then
|
||||
msg_error "This version of Proxmox Virtual Environment is not supported"
|
||||
echo -e "Requires PVE7 Version 7.4-13 or later, or PVE8 Version 8.1.1 or later."
|
||||
echo -e "Exiting..."
|
||||
@@ -220,17 +220,29 @@ advanced_settings() {
|
||||
fi
|
||||
done
|
||||
|
||||
if PW1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then
|
||||
if [ -z $PW1 ]; then
|
||||
PW1="Automatic Login"
|
||||
PW=""
|
||||
while true; do
|
||||
if PW1=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "\nSet Root Password (needed for root ssh access)" 9 58 --title "PASSWORD(leave blank for automatic login)" 3>&1 1>&2 2>&3); then
|
||||
if [[ ! -z "$PW1" ]]; then
|
||||
if [[ "$PW1" == *" "* ]]; then
|
||||
whiptail --msgbox "Password cannot contain spaces. Please try again." 8 58
|
||||
elif [ ${#PW1} -lt 5 ]; then
|
||||
whiptail --msgbox "Password must be at least 5 characters long. Please try again." 8 58
|
||||
else
|
||||
PW="-password $PW1"
|
||||
echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
|
||||
break
|
||||
fi
|
||||
else
|
||||
PW1="Automatic Login"
|
||||
PW=""
|
||||
echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
|
||||
break
|
||||
fi
|
||||
else
|
||||
PW="-password $PW1"
|
||||
exit-script
|
||||
fi
|
||||
echo -e "${DGN}Using Root Password: ${BGN}$PW1${CL}"
|
||||
else
|
||||
exit-script
|
||||
fi
|
||||
done
|
||||
|
||||
|
||||
if CT_ID=$(whiptail --backtitle "Proxmox VE Helper Scripts" --inputbox "Set Container ID" 8 58 $NEXTID --title "CONTAINER ID" 3>&1 1>&2 2>&3); then
|
||||
if [ -z "$CT_ID" ]; then
|
||||
|
||||
@@ -92,7 +92,7 @@ function check_root() {
|
||||
}
|
||||
|
||||
function pve_check() {
|
||||
if ! pveversion | grep -Eq "pve-manager/(7.4-[1][3-9]|8.1.[1-9])"; then
|
||||
if ! pveversion | grep -Eq "pve-manager/(7\.4-(1[3-8])|8\.[1-2])"; then
|
||||
msg_error "This version of Proxmox Virtual Environment is not supported"
|
||||
echo -e "Requires PVE7 Version 7.4-13 or later, or PVE8 Version 8.1.1 or later."
|
||||
echo -e "Exiting..."
|
||||
|
||||
@@ -115,7 +115,7 @@ function check_root() {
|
||||
}
|
||||
|
||||
function pve_check() {
|
||||
if ! pveversion | grep -Eq "pve-manager/(7.4-[1][3-9]|8.1.[1-9])"; then
|
||||
if ! pveversion | grep -Eq "pve-manager/(7\.4-(1[3-8])|8\.[1-2])"; then
|
||||
msg_error "This version of Proxmox Virtual Environment is not supported"
|
||||
echo -e "Requires PVE7 Version 7.4-13 or later, or PVE8 Version 8.1.1 or later."
|
||||
echo -e "Exiting..."
|
||||
|
||||
@@ -91,7 +91,7 @@ function check_root() {
|
||||
}
|
||||
|
||||
function pve_check() {
|
||||
if ! pveversion | grep -Eq "pve-manager/(7.4-[1][3-9]|8.1.[1-9])"; then
|
||||
if ! pveversion | grep -Eq "pve-manager/(7\.4-(1[3-8])|8\.[1-2])"; then
|
||||
msg_error "This version of Proxmox Virtual Environment is not supported"
|
||||
echo -e "Requires PVE7 Version 7.4-13 or later, or PVE8 Version 8.1.1 or later."
|
||||
echo -e "Exiting..."
|
||||
|
||||
@@ -157,7 +157,7 @@ function msg_error() {
|
||||
}
|
||||
|
||||
function pve_check() {
|
||||
if ! pveversion | grep -Eq "pve-manager/(7.4-[1][3-9]|8.1.[1-9])"; then
|
||||
if ! pveversion | grep -Eq "pve-manager/(7\.4-(1[3-8])|8\.[1-2])"; then
|
||||
echo -e "${CROSS} This version of Proxmox Virtual Environment is not supported"
|
||||
echo -e "Requires PVE7 Version 7.4-13 or later, or PVE8 Version 8.1.1 or later."
|
||||
echo -e "Exiting..."
|
||||
|
||||
@@ -91,7 +91,7 @@ function check_root() {
|
||||
}
|
||||
|
||||
function pve_check() {
|
||||
if ! pveversion | grep -Eq "pve-manager/(7.4-[1][3-9]|8.1.[1-9])"; then
|
||||
if ! pveversion | grep -Eq "pve-manager/(7\.4-(1[3-8])|8\.[1-2])"; then
|
||||
msg_error "This version of Proxmox Virtual Environment is not supported"
|
||||
echo -e "Requires PVE7 Version 7.4-13 or later, or PVE8 Version 8.1.1 or later."
|
||||
echo -e "Exiting..."
|
||||
|
||||
@@ -92,7 +92,7 @@ function check_root() {
|
||||
}
|
||||
|
||||
function pve_check() {
|
||||
if ! pveversion | grep -Eq "pve-manager/(7.4-[1][3-9]|8.1.[1-9])"; then
|
||||
if ! pveversion | grep -Eq "pve-manager/(7\.4-(1[3-8])|8\.[1-2])"; then
|
||||
msg_error "This version of Proxmox Virtual Environment is not supported"
|
||||
echo -e "Requires PVE7 Version 7.4-13 or later, or PVE8 Version 8.1.1 or later."
|
||||
echo -e "Exiting..."
|
||||
|
||||
Reference in New Issue
Block a user