Compare commits

..

No commits in common. "a4be2339535ad37a84e750739b9beb1d9160f937" and "b082f8a08e3b4e597bf069306194f597709c469c" have entirely different histories.

4 changed files with 62 additions and 25 deletions

View File

@ -10,13 +10,6 @@
- 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-02-19
### Changed
- **PairDrop LXC**
- Removed from the website ([more info](https://github.com/tteck/Proxmox/discussions/2516))
## 2024-02-16
### Changed

View File

@ -55,36 +55,82 @@ function default_settings() {
function update_script() {
header_info
if [[ ! -d /opt/Heimdall ]]; then msg_error "No ${APP} Installation Found!"; exit; fi
if ! whiptail --backtitle "Proxmox VE Helper Scripts" --title "WARNING" --yesno "Currently, v2.6.0 breaks the application. Proceed?" 10 58; then
clear
echo -e "⚠ User exited script \n"
exit
fi
msg_info "Stopping ${APP}"
systemctl disable heimdall.service &>/dev/null
systemctl stop heimdall
sleep 1
msg_ok "Stopped ${APP}"
msg_info "Backing up Data"
cp -R /opt/Heimdall/database database-backup
cp -R /opt/Heimdall/public public-backup
if [ -d "/opt/Heimdall-2.4.6" ]; then
cp -R /opt/Heimdall-2.4.6/database database-backup
cp -R /opt/Heimdall-2.4.6/public public-backup
elif [[ -d "/opt/Heimdall-2.4.7b" ]]; then
cp -R /opt/Heimdall-2.4.7b/database database-backup
cp -R /opt/Heimdall-2.4.7b/public public-backup
elif [[ -d "/opt/Heimdall-2.4.8" ]]; then
cp -R /opt/Heimdall-2.4.8/database database-backup
cp -R /opt/Heimdall-2.4.8/public public-backup
else
cp -R /opt/Heimdall/database database-backup
cp -R /opt/Heimdall/public public-backup
fi
sleep 1
msg_ok "Backed up Data"
RELEASE=$(curl -sX GET "https://api.github.com/repos/linuxserver/Heimdall/releases/latest" | awk '/tag_name/{print $4;exit}' FS='[""]')
msg_info "Updating Heimdall Dashboard to ${RELEASE}"
wget -q https://github.com/linuxserver/Heimdall/archive/${RELEASE}.tar.gz
tar xzf ${RELEASE}.tar.gz
VER=$(curl -s https://api.github.com/repos/linuxserver/Heimdall/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
cp -R Heimdall-${VER}/* /opt/Heimdall
cd /opt/Heimdall
apt-get install -y composer &>/dev/null
COMPOSER_ALLOW_SUPERUSER=1 composer dump-autoload &>/dev/null
curl --silent -o ${RELEASE}.tar.gz -L "https://github.com/linuxserver/Heimdall/archive/${RELEASE}.tar.gz" &>/dev/null
tar xvzf ${RELEASE}.tar.gz &>/dev/null
VER=$(curl -s https://api.github.com/repos/linuxserver/Heimdall/releases/latest |
grep "tag_name" |
awk '{print substr($2, 3, length($2)-4) }')
if [ ! -d "/opt/Heimdall" ]; then
mv Heimdall-${VER} /opt/Heimdall
else
cp -R Heimdall-${VER}/* /opt/Heimdall
fi
service_path="/etc/systemd/system/heimdall.service"
echo "[Unit]
Description=Heimdall
After=network.target
[Service]
Restart=always
RestartSec=5
Type=simple
User=root
WorkingDirectory=/opt/Heimdall
ExecStart="/usr/bin/php" artisan serve --port 7990 --host 0.0.0.0
TimeoutStopSec=30
[Install]
WantedBy=multi-user.target" >$service_path
msg_ok "Updated Heimdall Dashboard to ${RELEASE}"
msg_info "Restoring Data"
cd ~
cp -R database-backup/* /opt/Heimdall/database
cp -R public-backup/* /opt/Heimdall/public
sleep 1
msg_ok "Restored Data"
msg_info "Cleanup"
if [ -d "/opt/Heimdall-2.4.6" ]; then
rm -rf /opt/Heimdall-2.4.6
rm -rf /opt/v2.4.6.tar.gz
elif [[ -d "/opt/Heimdall-2.4.7b" ]]; then
rm -rf /opt/Heimdall-2.4.7b
rm -rf /opt/v2.4.7b.tar.gz
elif [[ -d "/opt/Heimdall-2.4.8" ]]; then
rm -rf /opt/Heimdall-2.4.8
rm -rf /opt/v2.4.8.tar.gz
fi
rm -rf ${RELEASE}.tar.gz
rm -rf Heimdall-${VER}
rm -rf public-backup
@ -94,7 +140,7 @@ sleep 1
msg_ok "Cleaned"
msg_info "Starting ${APP}"
systemctl start heimdall.service
systemctl enable --now heimdall.service &>/dev/null
sleep 2
msg_ok "Started ${APP}"
msg_ok "Updated Successfully"

View File

@ -27,14 +27,15 @@ $STD apt-get update
$STD apt-get install -y php8.3 php8.3-cli php8.3-{bz2,curl,mbstring,intl,sqlite3,zip,xml}
msg_ok "Installed PHP8.3"
RELEASE=$(curl -sX GET "https://api.github.com/repos/linuxserver/Heimdall/releases/latest" | awk '/tag_name/{print $4;exit}' FS='[""]')
#RELEASE=$(curl -sX GET "https://api.github.com/repos/linuxserver/Heimdall/releases/latest" | awk '/tag_name/{print $4;exit}' FS='[""]')
RELEASE=V2.5.8
msg_info "Installing Heimdall Dashboard ${RELEASE}"
wget -q https://github.com/linuxserver/Heimdall/archive/${RELEASE}.tar.gz
tar xzf ${RELEASE}.tar.gz
VER=$(curl -s https://api.github.com/repos/linuxserver/Heimdall/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
#VER=$(curl -s https://api.github.com/repos/linuxserver/Heimdall/releases/latest | grep "tag_name" | awk '{print substr($2, 3, length($2)-4) }')
VER=2.5.8
rm -rf ${RELEASE}.tar.gz
mv Heimdall-${VER} /opt/Heimdall
$STD apt-get install -y composer
msg_ok "Installed Heimdall Dashboard ${RELEASE}"
msg_info "Creating Service"
@ -55,9 +56,6 @@ TimeoutStopSec=30
[Install]
WantedBy=multi-user.target" >$service_path
systemctl enable -q --now heimdall.service
cd /opt/Heimdall
COMPOSER_ALLOW_SUPERUSER=1 composer dump-autoload &>/dev/null
systemctl restart heimdall.service
msg_ok "Created Service"
motd_ssh

View File

@ -45,7 +45,7 @@ excluded_containers=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "
function trim_container() {
local container=$1
header_info
echo -e "${BL}[Info]${GN} Trimming ${BL}$container${CL} \n"
echo -e "${BL}[Info]${GN} Trimming ${container} ${CL} \n"
local before_trim=$(lvs | awk -F '[[:space:]]+' 'NR>1 && (/Data%|'"vm-$container"'/) {gsub(/%/, "", $7); print $7}')
echo -e "${RD}Data before trim $before_trim%${CL}"
pct fstrim $container