Detect current version as upgrade information

Add step for troubleshooting notes
This commit is contained in:
2021-12-31 07:13:06 +01:00
parent e346a378c4
commit 80e2fadf12

View File

@@ -91,28 +91,53 @@ exit 0
step_10_info() { echo "Configuration notes"; }
step_10_alias() { ALIAS="notes"; }
step_10() {
echo "# smtp port if missing after installation"
echo" [$RC_LOC/config/config.inc.php]"
echo ' // SMTP port (default is 25; use 587 for STARTTLS or 465 for the'
echo ' // deprecated SSL over SMTP (aka SMTPS))'
echo " \$config['smtp_port'] = 465;"
echo
echo "# Enable two factor auth (installed with step config) for all user"
echo " [$RC_LOC/plugins/twofactor_gauthenticator/config.inc.php]"
echo " $rcmail_config['users_allowed_2FA'] = array('.*');"
echo
echo "# Add mobile skin to roundcube"
echo " cd ${RC_LOC}"
echo " git clone https://github.com/messagerie-melanie2/Roundcube-Skin-Melanie2-Larry-Mobile.git skins/melanie2_larry_mobile"
echo "# Install pspell and aspell spell check engine"
echo " apt install php7.x-pspell aspell-en aspell-de"
echo
echo " [$RC_LOC/config/config.inc.php]"
echo " \$config['spellcheck_engine'] = 'pspell';"
echo " \$config['spellcheck_languages'] = array("
echo " 'en' => 'English',"
echo " 'de' => 'Deutsch',"
echo " );"
outColor green
cat <<NOTES_END
# smtp port if missing after installation
[$RC_LOC/config/config.inc.php]
// SMTP port (default is 25; use 587 for STARTTLS or 465 for the
// deprecated SSL over SMTP (aka SMTPS))
\$config['smtp_port'] = 465;
# Enable two factor auth (installed with step config) for all user
[$RC_LOC/plugins/twofactor_gauthenticator/config.inc.php]
$rcmail_config['users_allowed_2FA'] = array('.*');
# Add mobile skin to roundcube and run step 'postupgrade'.
Don't forget to activate plugins if asked for.
[$RC_LOC/composer.json]
"require": {
...
"mobiledetect/mobiledetectlib": "^2.8",
"roundcube/elastic4mobile": "dev-master"
}
# Install pspell and aspell spell check engine
apt install php7.x-pspell aspell-en aspell-de
[$RC_LOC/config/config.inc.php]
\$config['spellcheck_engine'] = 'pspell';
\$config['spellcheck_languages'] = array(
'en' => 'English',
'de' => 'Deutsch',
);
NOTES_END
}
step_12_info() { echo "Troubleshooting"; }
step_12_alias() { ALIAS="trouble"; }
step_12() {
outColor green
cat <<TROUBLE_END
# On composer update errors.
* Backup '/var/www/webmail/plugin' config. Especially twofactor_gauthenticator
* Delete '/var/www/webmail/vendor' folder. Or at least 'vendor/autoload.php' and 'vendor/composer'
* 'sqn_roundcube -q postupgrade'
I also installed 'php-pear' since one error indicated connection to it.
TROUBLE_END
}
step_20_info() {
@@ -150,6 +175,8 @@ step_22_info() {
step_22_alias() { ALIAS="upgrade"; }
step_22() {
shift # don't need step number
local currentVersion=
if [ ! -z $1 ] ; then
latestVersion="$1"
else
@@ -161,7 +188,8 @@ step_22() {
return 1
elif [ $QUIET -eq 0 ] ; then
echo
exe read -p "Install $latestVersion to $RC_LOC [n]o/(y)es? " answer
currentVersion="$(grep -Po ' \| Version \K.*?(?= )' $RC_LOC/index.php)"
exe read -p "Install $latestVersion over $currentVersion to $RC_LOC [n]o/(y)es? " answer
case $answer in
[yY])
;;