1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/emailpoubelle_ynh.git synced 2024-09-03 18:26:29 +02:00

Update upgrade

This commit is contained in:
Krakinou 2018-11-24 15:12:20 +01:00 committed by GitHub
parent b1c00d1cda
commit e83e123e07
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -42,6 +42,7 @@ if [[ ! $?==0 ]]; then
#switch from previous (modified) conf.php to new one (emailpoubelle original)
cp ../src/conf-dist.php $final_path/conf-dist.new.php
#insert domain in line 24, DB in line 31, DBUSER in line 32, etc.
rep=$(cat $final_path/conf.php | grep "^[^//]" | grep "define('DOMAIN',")
sed -i "24s/.*/${rep}/" $final_path/conf-dist.new.php
rep=$(cat $final_path/conf.php | grep "^[^//]" | grep "define('DB',")
@ -50,6 +51,8 @@ if [[ ! $?==0 ]]; then
sed -i "32s/.*/${rep}/" $final_path/conf-dist.new.php
rep=$(cat $final_path/conf.php | grep "^[^//]" | grep "define('DBPASS',")
sed -i "33s/.*/${rep}/" $final_path/conf-dist.new.php
#replace old conf and process with install command
mv $final_path/conf.php $final_path/conf.php.old
mv $final_path/conf-dist.new.php $final_path/conf.php
ynh_replace_string "define('DB', 'sqlite:'" "//define('DB', 'sqlite:'" $final_path/conf.php
ynh_replace_string "define('ALIASLIMITBYMAIL" "//define('ALIASLIMITBYMAIL" $final_path/conf.php