Compare commits

..

5 Commits

Author SHA1 Message Date
648e452f8b Update CHANGELOG.md (#2865)
Some checks are pending
Auto Update .app-files / update-app-files (push) Waiting to run
Shellcheck / Shellcheck (push) Waiting to run
Create Changelog Pull Request / update-changelog-pull-request (push) Waiting to run
2025-03-05 20:07:17 +01:00
8e3177135f Kimai: Better Handling of Updates (backup var / env / yaml) (#2862)
* Kimai: Better Handling of Updates (backup var / env / yaml)

* formatting
2025-03-05 18:41:34 +01:00
7352cbc220 fix: updated the composer call (#2864) 2025-03-05 18:35:18 +01:00
3dd87d8989 Update CHANGELOG.md (#2859)
Some checks are pending
Shellcheck / Shellcheck (push) Waiting to run
Create Changelog Pull Request / update-changelog-pull-request (push) Waiting to run
2025-03-05 12:59:58 +01:00
4a3192b704 Fix NextcloudPi-Installation (#2853) 2025-03-05 12:17:31 +01:00
4 changed files with 71 additions and 50 deletions

View File

@ -14,6 +14,15 @@ Exercise vigilance regarding copycat or coat-tailing sites that seek to exploit
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.
## 2025-03-05
### 🚀 Updated Scripts
- #### 🐞 Bug Fixes
- Kimai: Better Handling of Updates (backup var / env / yaml) [@MickLesk](https://github.com/MickLesk) ([#2862](https://github.com/community-scripts/ProxmoxVE/pull/2862))
- Fix NextcloudPi-Installation [@MickLesk](https://github.com/MickLesk) ([#2853](https://github.com/community-scripts/ProxmoxVE/pull/2853))
## 2025-03-04
### 🆕 New Scripts

View File

@ -45,7 +45,8 @@ function update_script() {
cp -R Heimdall-${VER}/* /opt/Heimdall
cd /opt/Heimdall
$STD apt-get install -y composer
$STD COMPOSER_ALLOW_SUPERUSER=1 composer dump-autoload
export COMPOSER_ALLOW_SUPERUSER=1
$STD composer dump-autoload
echo "${RELEASE}" >/opt/${APP}_version.txt
msg_ok "Updated Heimdall Dashboard to ${RELEASE}"
msg_info "Restoring Data"

View File

@ -20,52 +20,62 @@ color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /opt/kimai ]]; then
msg_error "No ${APP} Installation Found!"
header_info
check_container_storage
check_container_resources
if [[ ! -d /opt/kimai ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
RELEASE=$(curl -s https://api.github.com/repos/kimai/kimai/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
BACKUP_DIR="/opt/kimai_backup"
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
msg_info "Stopping Apache2"
systemctl stop apache2
msg_ok "Stopped Apache2"
msg_info "Backing up Kimai configuration and var directory"
mkdir -p "$BACKUP_DIR"
[ -d /opt/kimai/var ] && cp -r /opt/kimai/var "$BACKUP_DIR/"
[ -f /opt/kimai/.env ] && cp /opt/kimai/.env "$BACKUP_DIR/"
[ -f /opt/kimai/config/packages/local.yaml ] && cp /opt/kimai/config/packages/local.yaml "$BACKUP_DIR/"
msg_ok "Backup completed"
msg_info "Updating ${APP} to ${RELEASE}"
rm -rf /opt/kimai
wget -q "https://github.com/kimai/kimai/archive/refs/tags/${RELEASE}.zip"
unzip -q ${RELEASE}.zip
mv kimai-${RELEASE} /opt/kimai
[ -d "$BACKUP_DIR/var" ] && cp -r "$BACKUP_DIR/var" /opt/kimai/
[ -f "$BACKUP_DIR/.env" ] && cp "$BACKUP_DIR/.env" /opt/kimai/
[ -f "$BACKUP_DIR/local.yaml" ] && cp "$BACKUP_DIR/local.yaml" /opt/kimai/config/packages/
rm -rf "$BACKUP_DIR"
cd /opt/kimai
$STD composer install --no-dev --optimize-autoloader
$STD bin/console kimai:update
chown -R :www-data .
chmod -R g+r .
chmod -R g+rw var/
chmod -R 777 /opt/kimai/var/
chown -R www-data:www-data /opt/kimai
chmod -R 755 /opt/kimai
echo "${RELEASE}" >/opt/${APP}_version.txt
msg_ok "Updated ${APP} to ${RELEASE}"
msg_info "Starting Apache2"
systemctl start apache2
msg_ok "Started Apache2"
msg_info "Cleaning Up"
rm -rf ${RELEASE}.zip
rm -rf "$BACKUP_DIR"
msg_ok "Cleaned"
msg_ok "Updated Successfully"
else
msg_ok "No update required. ${APP} is already at ${RELEASE}"
fi
exit
fi
RELEASE=$(curl -s https://api.github.com/repos/kimai/kimai/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
if [[ ! -f /opt/${APP}_version.txt ]] || [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]]; then
msg_info "Stopping Apache2"
systemctl stop apache2
msg_ok "Stopped Apache2"
msg_info "Updating ${APP} to ${RELEASE}"
cp /opt/kimai/.env /opt/.env
[ -f /opt/kimai/config/packages/local.yaml ] && cp /opt/kimai/config/packages/local.yaml /opt/local.yaml
rm -rf /opt/kimai
wget -q "https://github.com/kimai/kimai/archive/refs/tags/${RELEASE}.zip"
unzip -q ${RELEASE}.zip
mv kimai-${RELEASE} /opt/kimai
mv /opt/.env /opt/kimai/.env
[ -f /opt/local.yaml ] && mv /opt/local.yaml /opt/kimai/config/packages/local.yaml
cd /opt/kimai
$STD composer install --no-dev --optimize-autoloader
$STD bin/console kimai:update
chown -R :www-data .
chmod -R g+r .
chmod -R g+rw var/
chmod -R 777 /opt/kimai/var/
chown -R www-data:www-data /opt/kimai
chmod -R 755 /opt/kimai
echo "${RELEASE}" >/opt/${APP}_version.txt
msg_ok "Updated ${APP} to ${RELEASE}"
msg_info "Starting Apache2"
systemctl start apache2
msg_ok "Started Apache2"
msg_info "Cleaning Up"
rm -rf ${RELEASE}.zip
msg_ok "Cleaned"
msg_ok "Updated Successfully"
else
msg_ok "No update required. ${APP} is already at ${RELEASE}"
fi
exit
}
start

View File

@ -14,13 +14,14 @@ 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
$STD apt-get install -y \
curl \
sudo \
mc
msg_ok "Installed Dependencies"
msg_info "Installing NextCloudPi (Patience)"
$STD bash <(curl -fsSL https://raw.githubusercontent.com/nextcloud/nextcloudpi/master/install.sh)
bash <(curl -fsSL https://raw.githubusercontent.com/nextcloud/nextcloudpi/master/install.sh) >/dev/null 2>&1
msg_ok "Installed NextCloudPi"
motd_ssh