Skip to content

Commit 88bc0a9

Browse files
authored
Fix in migrate / upgrade scripts (hestiacp#1833)
* Update migrate scripts to not have issues * Fix output update script * Spelling error in package name
1 parent a8988eb commit 88bc0a9

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

install/upgrade/manual/migrate_phpmyadmin.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ then
3838
cp -r /var/lib/phpmyadmin/* /root/hst_backup_man/var_phmyadmin
3939

4040
echo '[ * ] Remove PHPmyAdmin via ATP'
41-
apt-get autoremove phpmyadmin
41+
apt-mark hold phpmyadmin
4242

4343
echo '[ * ] Delete possible trail'
4444
# make sure everything is deleted

install/upgrade/manual/migrate_roundcube.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ if [[ $REPLY =~ ^[Yy]$ ]]
3030
then
3131
version=$(cat /usr/share/roundcube/index.php | grep -o -E '[0-9].[0-9].[0-9]+' | head -1);
3232
# Backup database
33+
echo "#version $version" >> ~/roundcube.sql
3334
echo "SET FOREIGN_KEY_CHECKS = 0;" >> ~/roundcube.sql
3435
mysqldump --add-drop-table roundcube >> ~/roundcube.sql
3536
echo "SET FOREIGN_KEY_CHECKS = 1;" >> ~/roundcube.sql
@@ -44,6 +45,11 @@ then
4445
# Install roundcube
4546
$HESTIA/bin/v-add-sys-roundcube
4647
# restore backup
48+
echo "SET FOREIGN_KEY_CHECKS = 0;" > ~/drop_all_tables.sql
49+
( mysqldump --add-drop-table --no-data -u root roundcube | grep 'DROP TABLE' ) >> ./drop_all_tables.sql
50+
echo "SET FOREIGN_KEY_CHECKS = 1;" >> ~/drop_all_tables.sql
51+
mysql -u root roundcube < ./drop_all_tables.sql
52+
4753
mysql roundcube < ~/roundcube.sql
4854
/var/lib/roundcube/bin/update.sh --version "$version"
4955
fi

install/upgrade/versions/1.4.0.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,7 @@ fi
117117
if [ ! -z "$WEBMAIL_SYSTEM" ]; then
118118
for user in $($BIN/v-list-users plain | cut -f1); do
119119
for domain in $($BIN/v-list-mail-domains $user plain | cut -f1); do
120-
$BIN/v-add-mail-domain-webmail $user $domain
120+
$BIN/v-add-mail-domain-webmail $user $domain '' no
121121
done
122122
done
123123
fi

0 commit comments

Comments
 (0)