Files
ProxmoxVE/ct/hortusfox.sh
T

73 lines
2.1 KiB
Bash
Raw Normal View History

#!/usr/bin/env bash
2025-08-08 08:13:24 +02:00
source <(curl -fsSL https://raw.githubusercontent.com/community-scripts/ProxmoxVE/main/misc/build.func)
# Copyright (c) 2021-2026 community-scripts ORG
2025-08-08 08:13:24 +02:00
# Author: MickLesk (CanbiZ)
# License: MIT | https://github.com/community-scripts/ProxmoxVE/raw/main/LICENSE
# Source: https://github.com/danielbrendel/hortusfox-web
APP="HortusFox"
var_tags="${var_tags:-plants}"
var_cpu="${var_cpu:-2}"
var_ram="${var_ram:-2048}"
var_disk="${var_disk:-5}"
var_os="${var_os:-debian}"
var_version="${var_version:-13}"
2026-06-12 00:16:15 +10:00
var_arm64="${var_arm64:-yes}"
2025-08-08 08:13:24 +02:00
var_unprivileged="${var_unprivileged:-1}"
header_info "$APP"
variables
color
catch_errors
function update_script() {
header_info
check_container_storage
check_container_resources
if [[ ! -d /opt/hortusfox ]]; then
msg_error "No ${APP} Installation Found!"
exit
fi
setup_mariadb
2025-09-16 11:11:54 +02:00
if check_for_gh_release "hortusfox" "danielbrendel/hortusfox-web"; then
2025-08-08 08:13:24 +02:00
msg_info "Stopping Service"
systemctl stop apache2
msg_ok "Stopped Service"
msg_info "Backing up current HortusFox installation"
cd /opt
mv /opt/hortusfox/ /opt/hortusfox-backup
msg_ok "Backed up current HortusFox installation"
2026-05-03 22:29:06 +02:00
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "hortusfox" "danielbrendel/hortusfox-web" "tarball"
2025-08-08 08:13:24 +02:00
msg_info "Updating HortusFox"
cd /opt/hortusfox
2026-05-03 22:29:06 +02:00
cp /opt/hortusfox-backup/.env /opt/hortusfox/.env
cp -a /opt/hortusfox-backup/public/img/. /opt/hortusfox/public/img/
export COMPOSER_ALLOW_SUPERUSER=1
2025-08-08 08:13:24 +02:00
$STD composer install --no-dev --optimize-autoloader
2026-05-03 22:29:06 +02:00
$STD php asatru migrate:upgrade
2025-08-08 08:13:24 +02:00
$STD php asatru plants:attributes
$STD php asatru calendar:classes
2025-08-12 09:38:24 +00:00
chown -R www-data:www-data /opt/hortusfox
rm -r /opt/hortusfox-backup
2025-08-08 08:13:24 +02:00
msg_ok "Updated HortusFox"
msg_info "Starting Service"
systemctl start apache2
msg_ok "Started Service"
msg_ok "Updated successfully!"
2025-08-08 08:13:24 +02:00
fi
exit
}
start
build_container
description
2026-01-06 22:57:40 +01:00
msg_ok "Completed successfully!\n"
2025-08-08 08:13:24 +02:00
echo -e "${CREATING}${GN}${APP} setup has been successfully initialized!${CL}"
echo -e "${INFO}${YW}Access it using the following URL:${CL}"
echo -e "${GATEWAY}${BGN}http://${IP}${CL}"