Chore: Implement feedback
This commit is contained in:
parent
df4926d179
commit
9f01464234
@ -1,27 +1,18 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
|
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVED/main/misc/build.func)
|
||||||
|
|
||||||
# Copyright (c) 2021-2025 community-scripts ORG
|
# Copyright (c) 2021-2025 community-scripts ORG
|
||||||
# Author: Stroopwafe1
|
# Author: Stroopwafe1
|
||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
# Source: https://leantime.io
|
# Source: https://leantime.io
|
||||||
|
|
||||||
# App Default Values
|
|
||||||
# Name of the app (e.g. Google, Adventurelog, Apache-Guacamole"
|
|
||||||
APP="Leantime"
|
APP="Leantime"
|
||||||
# Tags for Proxmox VE, maximum 2 pcs., no spaces allowed, separated by a semicolon ; (e.g. database | adblock;dhcp)
|
|
||||||
var_tags="${var_tags:-productivity}"
|
var_tags="${var_tags:-productivity}"
|
||||||
# Number of cores (1-X) (e.g. 4) - default are 2
|
|
||||||
var_cpu="${var_cpu:-2}"
|
var_cpu="${var_cpu:-2}"
|
||||||
# Amount of used RAM in MB (e.g. 2048 or 4096)
|
|
||||||
var_ram="${var_ram:-2048}"
|
var_ram="${var_ram:-2048}"
|
||||||
# Amount of used disk space in GB (e.g. 4 or 10)
|
|
||||||
var_disk="${var_disk:-20}"
|
var_disk="${var_disk:-20}"
|
||||||
# Default OS (e.g. debian, ubuntu, alpine)
|
|
||||||
var_os="${var_os:-debian}"
|
var_os="${var_os:-debian}"
|
||||||
# Default OS version (e.g. 12 for debian, 24.04 for ubuntu, 3.20 for alpine)
|
|
||||||
var_version="${var_version:-12}"
|
var_version="${var_version:-12}"
|
||||||
# 1 = unprivileged container, 0 = privileged container
|
|
||||||
var_unprivileged="${var_unprivileged:-1}"
|
var_unprivileged="${var_unprivileged:-1}"
|
||||||
|
|
||||||
header_info "$APP"
|
header_info "$APP"
|
||||||
@ -40,32 +31,11 @@ function update_script() {
|
|||||||
exit
|
exit
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Crawling the new version and checking whether an update is required
|
msg_info "Creating Backup"
|
||||||
RELEASE=$(curl -fsSL https://api.github.com/repos/Leantime/leantime/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
mariadb-dump leantime >"/opt/${APP}_db_backup_$(date +%F).sql"
|
||||||
if [[ "${RELEASE}" != "$(cat /opt/${APP}_version.txt)" ]] || [[ ! -f /opt/${APP}_version.txt ]]; then
|
tar -czf "/opt/${APP}_backup_$(date +%F).tar.gz" "/opt/${APP}"
|
||||||
# Creating Backup
|
msg_ok "Backup Created"
|
||||||
msg_info "Creating Backup"
|
fetch_and_deploy_gh_release "$APP" "Leantime/leantime" "prebuild" "latest" "/opt/${APP}" Leantime-v[0-9].[0-9].[0-9].tar.gz
|
||||||
mariadb-dump leantime >"/opt/${APP}_db_backup_$(date +%F).sql"
|
|
||||||
tar -czf "/opt/${APP}_backup_$(date +%F).tar.gz" /opt/leantime
|
|
||||||
msg_ok "Backup Created"
|
|
||||||
|
|
||||||
# Execute Update
|
|
||||||
msg_info "Updating $APP to v${RELEASE}"
|
|
||||||
curl -fsSL -o "${RELEASE}.tar.gz" "https://github.com/Leantime/leantime/archive/refs/tags/${RELEASE}.tar.gz"
|
|
||||||
tar xf "${RELEASE}.tar.gz" --strip-components=1 -C "/opt/${APP}"
|
|
||||||
msg_ok "Updated $APP to v${RELEASE}"
|
|
||||||
|
|
||||||
# Cleaning up
|
|
||||||
msg_info "Cleaning Up"
|
|
||||||
rm -rf "${RELEASE}.tar.gz"
|
|
||||||
msg_ok "Cleanup Completed"
|
|
||||||
|
|
||||||
# Last Action
|
|
||||||
echo "${RELEASE}" >/opt/${APP}_version.txt
|
|
||||||
msg_ok "Update Successful"
|
|
||||||
else
|
|
||||||
msg_ok "No update required. ${APP} is already at v${RELEASE}"
|
|
||||||
fi
|
|
||||||
exit
|
exit
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
"documentation": "https://docs.leantime.io/",
|
"documentation": "https://docs.leantime.io/",
|
||||||
"config_path": "/opt/Leantime/config/.env",
|
"config_path": "/opt/Leantime/config/.env",
|
||||||
"website": "https://leantime.io",
|
"website": "https://leantime.io",
|
||||||
"logo": "https://assets.leantime.io/wp-content/uploads/2019/02/iconOnly-700.png",
|
"logo": "https://cdn.jsdelivr.net/gh/selfhst/icons/webp/leantime.webp",
|
||||||
"description": "Leantime is a goals focused project management system for non-project managers. Building with ADHD, Autism, and dyslexia in mind. ",
|
"description": "Leantime is a goals focused project management system for non-project managers. Building with ADHD, Autism, and dyslexia in mind. ",
|
||||||
"install_methods": [
|
"install_methods": [
|
||||||
{
|
{
|
||||||
|
@ -5,7 +5,6 @@
|
|||||||
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
|
||||||
# Source: https://leantime.io
|
# Source: https://leantime.io
|
||||||
|
|
||||||
# Import Functions und Setup
|
|
||||||
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
source /dev/stdin <<<"$FUNCTIONS_FILE_PATH"
|
||||||
color
|
color
|
||||||
verb_ip6
|
verb_ip6
|
||||||
@ -35,7 +34,6 @@ setup_mariadb
|
|||||||
|
|
||||||
msg_ok "Installed Dependencies"
|
msg_ok "Installed Dependencies"
|
||||||
|
|
||||||
# Template: MySQL Database
|
|
||||||
msg_info "Setting up Database"
|
msg_info "Setting up Database"
|
||||||
systemctl enable -q --now mariadb
|
systemctl enable -q --now mariadb
|
||||||
DB_NAME=leantime
|
DB_NAME=leantime
|
||||||
@ -55,11 +53,7 @@ msg_ok "Set up Database"
|
|||||||
# Setup App
|
# Setup App
|
||||||
msg_info "Setup ${APPLICATION}"
|
msg_info "Setup ${APPLICATION}"
|
||||||
APACHE_LOG_DIR=/var/log/apache2
|
APACHE_LOG_DIR=/var/log/apache2
|
||||||
RELEASE=$(curl -fsSL https://api.github.com/repos/Leantime/leantime/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
|
fetch_and_deploy_gh_release "$APPLICATION" "Leantime/leantime" "prebuild" "latest" "/opt/${APPLICATION}" Leantime-v[0-9].[0-9].[0-9].tar.gz
|
||||||
curl -fsSL -o "${RELEASE}.tar.gz" "https://github.com/Leantime/leantime/releases/download/${RELEASE}/Leantime-${RELEASE}.tar.gz"
|
|
||||||
mkdir -p "/opt/${APPLICATION}"
|
|
||||||
mkdir -p /etc/apache2/sites-enabled
|
|
||||||
tar xf "${RELEASE}.tar.gz" --strip-components=1 -C "/opt/${APPLICATION}"
|
|
||||||
chown -R www-data:www-data "/opt/${APPLICATION}"
|
chown -R www-data:www-data "/opt/${APPLICATION}"
|
||||||
chmod -R 750 "/opt/${APPLICATION}"
|
chmod -R 750 "/opt/${APPLICATION}"
|
||||||
|
|
||||||
@ -99,7 +93,6 @@ sed -i -e "s/^;extension.\(curl\|fileinfo\|gd\|intl\|ldap\|mbstring\|exif\|mysql
|
|||||||
|
|
||||||
systemctl restart apache2
|
systemctl restart apache2
|
||||||
|
|
||||||
echo "${RELEASE}" >/opt/"${APPLICATION}"_version.txt
|
|
||||||
msg_ok "Setup ${APPLICATION}"
|
msg_ok "Setup ${APPLICATION}"
|
||||||
|
|
||||||
motd_ssh
|
motd_ssh
|
||||||
@ -107,7 +100,6 @@ customize
|
|||||||
|
|
||||||
# Cleanup
|
# Cleanup
|
||||||
msg_info "Cleaning up"
|
msg_info "Cleaning up"
|
||||||
rm -f "${RELEASE}".tar.gz
|
|
||||||
$STD apt-get -y autoremove
|
$STD apt-get -y autoremove
|
||||||
$STD apt-get -y autoclean
|
$STD apt-get -y autoclean
|
||||||
msg_ok "Cleaned"
|
msg_ok "Cleaned"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user