forked from hestiacp/hestiacp
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpostinst
More file actions
53 lines (37 loc) · 1.48 KB
/
postinst
File metadata and controls
53 lines (37 loc) · 1.48 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/bin/bash
if [ ! -e "/usr/local/hestia/data/users/admin" ]; then
exit
fi
###############################################################
# Initialize functions/variables #
###############################################################
# Load upgrade functions and refresh variables/configuration
source /usr/local/hestia/func/upgrade.sh
upgrade_refresh_config
###############################################################
# Set new version numbers for packages #
###############################################################
# Hestia Control Panel
new_version=$(dpkg -l | awk '$2=="hestia" { print $3 }')
# phpMyAdmin
pma_v='5.0.2'
###############################################################
# Begin standard upgrade routines #
###############################################################
# Set up console display and welcome message
upgrade_welcome_message
# Initialize backup directories
upgrade_init_backup
# Execute version-specific upgrade scripts
upgrade_start_routine
# Upgrade phpMyAdmin if applicable
upgrade_phpmyadmin
# Set new version number in hestia.conf
upgrade_set_version $new_version
# Perform account and domain rebuild to ensure configuration files are correct
upgrade_rebuild_users
# Restart necessary services for changes to take full effect
upgrade_restart_services
# Add upgrade notification to admin user's panel and display completion message
upgrade_complete_message
exit 0