This commit is contained in:
Alexey Berezhok
2024-03-19 22:05:27 +03:00
commit 346a50856b
1572 changed files with 182163 additions and 0 deletions

14
src/deb/hestia/control Normal file
View File

@@ -0,0 +1,14 @@
Source: hestia
Package: hestia
Priority: optional
Version: 1.9.0~alpha
Section: admin
Maintainer: HestiaCP <info@hestiacp.com>
Homepage: https://www.hestiacp.com
Architecture: amd64
Depends: bash, awk, sed, acl, sysstat, setpriv | util-linux (>= 2.33), zstd, lsb-release, idn2, jq
Description: hestia
hestia is an open source hosting control panel.
hestia has a clean and focused interface without the clutter.
hestia has the latest of very innovative technologies.
hestia is a fork from VestaCP, special thanks to vestacp.com and Serghey Rodin

30
src/deb/hestia/copyright Normal file
View File

@@ -0,0 +1,30 @@
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: hestia
Source: https://www.hestiacp.com
Files: *
Copyright: 2018-2023, Hestia Control Panel <info@hestiacp.com>
License: GPL-3.0+
Remarks: Hestia Control Panel is a fork from VestaCP, special thanks to vestacp.com and Serghey Rodin
License: GPL-3.0+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
.
On Debian systems, the complete text of the GNU General
Public License version 3 can be found in /usr/share/common-licenses/GPL-3.
# Please also look if there are files or directories which have a
# different copyright/license attached and list them here.
# Please avoid to pick license terms that are more restrictive than the
# packaged work, as it may make Debian's contributions unacceptable upstream.

126
src/deb/hestia/postinst Normal file
View File

@@ -0,0 +1,126 @@
#!/bin/bash
if [ ! -e "/usr/local/hestia/data/users/admin" ]; then
exit
fi
###############################################################
# Initialize functions/variables #
###############################################################
source /etc/hestiacp/hestia.conf
# Load upgrade functions and variables
# shellcheck source=/usr/local/hestia/func/main.sh
source $HESTIA/func/main.sh
# shellcheck source=/usr/local/hestia/func/upgrade.sh
source $HESTIA/func/upgrade.sh
source_conf "$HESTIA/conf/hestia.conf"
###############################################################
# Set new version numbers for packages #
###############################################################
# Hestia Control Panel
new_version=$(dpkg -l | awk '$2=="hestia" { print $3 }')
###############################################################
# Begin standard upgrade routines #
###############################################################
# Set default verbose output based on release branch
is_debug_build
# Detect operating system version
detect_os
# Initialize upgrade
prepare_upgrade_config
# Initialize backup directories
upgrade_init_backup
# Initialize logging
upgrade_init_logging
# Check if preinstall hook exists
if [ -e "/etc/hestiacp/hooks/pre_install.sh" ]; then
/etc/hestiacp/hooks/pre_install.sh
fi
# Set up console display and welcome message
upgrade_welcome_message_log >> $LOG
upgrade_welcome_message
# Back up existing configuration files and templates
upgrade_start_backup | tee -a $LOG
# Perform upgrade health check and refresh configuration before upgrading
upgrade_health_check | tee -a $LOG
upgrade_replace_default_config | tee -a $LOG
upgrade_refresh_config | tee -a $LOG
# Execute version-specific upgrade scripts
upgrade_start_routine | tee -a $LOG
# Run upgrades of dependencies
source_conf "$HESTIA_BACKUP/upgrade.conf"
# Update Web domain templates
upgrade_rebuild_web_templates | tee -a $LOG
# Update Mail domain templates
upgrade_rebuild_mail_templates | tee -a $LOG
# Update DNS zone templates
upgrade_rebuild_dns_templates | tee -a $LOG
# Upgrade File Manager and update configuration
upgrade_filemanager | tee -a $LOG
# Upgrade SnappyMail if applicable
upgrade_snappymail | tee -a $LOG
# Upgrade Roundcube if applicable
upgrade_roundcube | tee -a $LOG
# Upgrade PHP dependencies
upgrade_dependencies | tee -a $LOG
# Update Cloudflare IPs if applicable
upgrade_cloudflare_ip | tee -a $LOG
# Upgrade phpMyAdmin if applicable
upgrade_phpmyadmin | tee -a $LOG
# Upgrade phpPgAdmin if applicable
upgrade_phppgadmin | tee -a $LOG
# Upgrade blackblaze-cli-took if applicable
upgrade_b2_tool | tee -a $LOG
# update whitelabel logo's
update_whitelabel_logo | tee -a $LOG
# Set new version number in hestia.conf
upgrade_set_version $new_version
upgrade_set_branch $new_version
# Perform upgrade clean-up tasks (rebuild domains and users, restart services, delete temporary files)
upgrade_cleanup_message | tee -a $LOG
upgrade_rebuild_users | tee -a $LOG
upgrade_restart_services | tee -a $LOG
# Add upgrade notification to admin user's panel and display completion message
upgrade_complete_message_log >> $LOG
upgrade_complete_message
# If setting variables are set to true in hestia.conf, send notifications and email output.
upgrade_send_notification_to_panel
upgrade_send_notification_to_email
upgrade_send_log_to_email
if [ -e "/etc/hestiacp/hooks/post_install.sh" ]; then
/etc/hestiacp/hooks/post_install.sh
fi
exit 0

19
src/deb/hestia/preinst Normal file
View File

@@ -0,0 +1,19 @@
#!/bin/bash
# Run triggers only on updates
if [ ! -e "/usr/local/hestia/data/users/admin" ]; then
exit
fi
if [ ! -e "/etc/hestiacp/hestia.conf" ]; then
mkdir -p /etc/hestiacp
echo -e "# Do not edit this file, will get overwritten on next upgrade, use /etc/hestiacp/local.conf instead\n\nexport HESTIA='/usr/local/hestia'\n\n[[ -f /etc/hestiacp/local.conf ]] && source /etc/hestiacp/local.conf" > /etc/hestiacp/hestia.conf
fi
# Configure apt to retry downloading on error
if [ ! -f /etc/apt/apt.conf.d/80-retries ]; then
echo "APT::Acquire::Retries \"3\";" > /etc/apt/apt.conf.d/80-retries
fi
# Validate version number and replace if different
HESTIA_V=$(dpkg -s hestia | grep -i version | awk '{ print $2 }')