Skip to content

Commit 947e6df

Browse files
committed
Merge branch 'main' into release
2 parents b718eb5 + e74ed95 commit 947e6df

File tree

64 files changed

+106
-72
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+106
-72
lines changed

CHANGELOG.md

Lines changed: 20 additions & 1 deletion

README.md

Lines changed: 1 addition & 1 deletion

bin/v-add-user-sftp-jail

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,13 @@ source_conf "$HESTIA/conf/hestia.conf"
2828

2929
check_args '1' "$#" 'USER'
3030
is_format_valid 'user'
31-
is_object_valid 'user' 'USER' "$user" # Limit to only Hestia user(s)
31+
check=$(is_object_valid 'user' 'USER' "$user")
32+
if [ $? -ne 0 ]; then
33+
user_str=$(grep "^$user:" /etc/passwd |egrep "rssh|nologin")
34+
#try to detect "owner" of the ftp_user if not found dont set it up
35+
user=$(echo $user_str | cut -f6 -d : | cut -f3 -d / )
36+
is_object_valid 'user' 'USER' "$user"
37+
fi
3238
user_str=$(grep "^$user:" /etc/passwd |egrep "rssh|nologin")
3339
if [ -z "$user_str" ]; then
3440
exit

bin/v-update-database-disk

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,8 @@ check_args '2' "$#" 'USER DATABASE'
3232
is_format_valid 'user' 'database'
3333
is_system_enabled "$DB_SYSTEM" 'DB_SYSTEM'
3434
is_object_valid 'user' 'USER' "$user"
35-
is_object_unsuspended 'user' 'USER' "$user"
3635
is_object_valid 'db' 'DB' "$database"
37-
is_object_unsuspended 'db' 'DB' "$database"
36+
3837

3938
#----------------------------------------------------------#
4039
# Action #

bin/v-update-databases-disk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ is_object_valid 'user' 'USER' "$user"
3535
#----------------------------------------------------------#
3636

3737
# Starting update loop
38-
for database in $(search_objects 'db' 'SUSPENDED' "no" 'DB'); do
38+
for database in $($BIN/v-list-databases $user plain | cut -f 1); do
3939
$BIN/v-update-database-disk "$user" "$database"
4040
done
4141

bin/v-update-mail-domain-disk

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,9 +36,7 @@ check_args '2' "$#" 'USER DOMAIN'
3636
is_format_valid 'user' 'domain'
3737
is_system_enabled "$MAIL_SYSTEM" 'MAIL_SYSTEM'
3838
is_object_valid 'user' 'USER' "$user"
39-
is_object_unsuspended 'user' 'USER' "$user"
4039
is_object_valid 'mail' 'DOMAIN' "$domain"
41-
is_object_unsuspended 'mail' 'DOMAIN' "$domain"
4240
if [ -z "$MAIL_SYSTEM" ] || [ "$MAIL_SYSTEM" = 'remote' ]; then
4341
exit
4442
fi
@@ -49,7 +47,7 @@ fi
4947

5048
# Starting loop
5149
dom_disk=0
52-
for account in $(search_objects "mail/$domain" 'SUSPENDED' "no" 'ACCOUNT'); do
50+
for account in $($BIN/v-list-mail-accounts $user $domain plain | cut -f 1); do
5351
home_dir=$HOMEDIR/$user/mail/$domain/$account
5452
if [ -e "$home_dir" ]; then
5553
udisk=$(nice -n 19 du -shm $home_dir | cut -f 1 )

bin/v-update-mail-domains-disk

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,9 @@ fi
3838
#----------------------------------------------------------#
3939

4040
# Starting loop
41-
for domain in $(search_objects 'mail' 'SUSPENDED' "no" 'DOMAIN'); do
41+
for domain in $($BIN/v-list-mail-domains $user plain | cut -f 1); do
4242
dom_disk=0
43-
accounts=$(search_objects "mail/$domain" 'SUSPENDED' "no" 'ACCOUNT')
44-
for account in $accounts; do
43+
for account in $($BIN/v-list-mail-accounts $user $domain plain | cut -f 1); do
4544
home_dir=$HOMEDIR/$user/mail/$domain/$account
4645
if [ -e "$home_dir" ]; then
4746
udisk=$(nice -n 19 du -shm $home_dir | cut -f 1 )

bin/v-update-web-domain-disk

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,7 @@ check_args '2' "$#" 'USER DOMAIN'
3838
is_format_valid 'user' 'domain'
3939
is_system_enabled "$WEB_SYSTEM" 'WEB_SYSTEM'
4040
is_object_valid 'user' 'USER' "$user"
41-
is_object_unsuspended 'user' 'USER' "$user"
4241
is_object_valid 'web' 'DOMAIN' "$domain"
43-
is_object_unsuspended 'web' 'DOMAIN' "$domain"
4442

4543
#----------------------------------------------------------#
4644
# Action #

bin/v-update-web-domains-disk

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ is_object_valid 'user' 'USER' "$user"
3535
#----------------------------------------------------------#
3636

3737
# Loop through all domains that are not suspended
38-
for domain in $(search_objects 'web' 'SUSPENDED' "no" 'DOMAIN'); do
38+
for domain in $($BIN/v-list-web-domains $user plan | cut -f 1); do
3939
home_dir="$HOMEDIR/$user/web/$domain/"
4040
if [ -e "$home_dir" ]; then
4141
disk_usage=$(nice -n 19 du -shm $home_dir | cut -f 1 )

func/upgrade.sh

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ upgrade_start_backup() {
481481
if [ "$DEBUG_MODE" = "true" ]; then
482482
echo " ---- Rainloop"
483483
fi
484-
cp -fr /etc/roundcube/* $HESTIA_BACKUP/conf/roundcube
484+
cp -fr /etc/rainloop/* $HESTIA_BACKUP/conf/rainloop
485485
fi
486486
if [ -d "/etc/phpmyadmin" ]; then
487487
if [ "$DEBUG_MODE" = "true" ]; then
@@ -632,7 +632,8 @@ upgrade_filemanager() {
632632
upgrade_roundcube(){
633633
if [ -n "$(echo "$WEBMAIL_SYSTEM" | grep -w 'roundcube')" ]; then
634634
if [ -d "/usr/share/roundcube" ]; then
635-
echo "[ * ] Roundcube: Unable to update. Updates are managed by apt.";
635+
echo "[ ! ] Roundcube: Updates are currently managed using the apt package manager";
636+
echo " To upgrade to the latest version of Roundcube directly from upstream, from please run the command migrate_roundcube.sh located in: /usr/local/hestia/install/upgrade/manual/"
636637
else
637638
rc_version=$(cat /var/lib/roundcube/index.php | grep -o -E '[0-9].[0-9].[0-9]+' | head -1);
638639
if [ "$rc_version" != "$rc_v" ]; then

0 commit comments

Comments
 (0)