mirror of
https://github.com/YunoHost-Apps/roundcube_ynh.git
synced 2024-09-03 20:16:28 +02:00
Cleaning up
This commit is contained in:
parent
e3f06bd930
commit
c9f4a58bf0
5 changed files with 9 additions and 23 deletions
|
@ -14,7 +14,6 @@
|
||||||
upgrade=1
|
upgrade=1
|
||||||
backup_restore=1
|
backup_restore=1
|
||||||
multi_instance=1
|
multi_instance=1
|
||||||
port_already_use=0
|
|
||||||
change_url=1
|
change_url=1
|
||||||
;;; Options
|
;;; Options
|
||||||
Email=
|
Email=
|
||||||
|
|
|
@ -28,7 +28,7 @@ $config = array();
|
||||||
// For examples see http://pear.php.net/manual/en/package.database.mdb2.intro-dsn.php
|
// For examples see http://pear.php.net/manual/en/package.database.mdb2.intro-dsn.php
|
||||||
// NOTE: for SQLite use absolute path (Linux): 'sqlite:////full/path/to/sqlite.db?mode=0646'
|
// NOTE: for SQLite use absolute path (Linux): 'sqlite:////full/path/to/sqlite.db?mode=0646'
|
||||||
// or (Windows): 'sqlite:///C:/full/path/to/sqlite.db'
|
// or (Windows): 'sqlite:///C:/full/path/to/sqlite.db'
|
||||||
$config['db_dsnw'] = 'mysql://__DB_USER__:__DB_PWD__@localhost/__DB_NAME__';
|
$config['db_dsnw'] = 'mysql://__DB_NAME__:__DB_PWD__@localhost/__DB_NAME__';
|
||||||
|
|
||||||
// The IMAP host chosen to perform the log-in.
|
// The IMAP host chosen to perform the log-in.
|
||||||
// Leave blank to show a textbox at login, give a list of hosts
|
// Leave blank to show a textbox at login, give a list of hosts
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
"en": "Choose the application language",
|
"en": "Choose the application language",
|
||||||
"fr": "Choisissez la langue de l'application"
|
"fr": "Choisissez la langue de l'application"
|
||||||
},
|
},
|
||||||
"choices": ["fr_FR", "en_GB", "de_DE"],
|
"choices": ["de_DE", "en_GB", "fr_FR", "it_IT"],
|
||||||
"default": "en_GB"
|
"default": "en_GB"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
|
|
@ -123,14 +123,9 @@ ynh_mysql_connect_as --user="$db_name" --password="$db_pwd" --database="$db_name
|
||||||
ynh_script_progression --message="Configuring Roundcube..."
|
ynh_script_progression --message="Configuring Roundcube..."
|
||||||
|
|
||||||
rc_conf="$final_path/config/config.inc.php"
|
rc_conf="$final_path/config/config.inc.php"
|
||||||
|
deskey=$(ynh_string_random --length=24)
|
||||||
|
|
||||||
cp ../conf/config.inc.php "$rc_conf"
|
ynh_add_config --template="../conf/config.inc.php" --destination="$rc_conf"
|
||||||
|
|
||||||
ynh_replace_string --match_string="__DESKEY__" --replace_string="$(ynh_string_random --length=24)" --target_file="$rc_conf"
|
|
||||||
ynh_replace_string --match_string="__DB_USER__" --replace_string="$db_name" --target_file="$rc_conf"
|
|
||||||
ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$rc_conf"
|
|
||||||
ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$rc_conf"
|
|
||||||
ynh_replace_string --match_string="__LANGUAGE__" --replace_string="$language" --target_file="$rc_conf"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# INSTALL ADDITIONAL PLUGINS
|
# INSTALL ADDITIONAL PLUGINS
|
||||||
|
@ -181,7 +176,7 @@ then
|
||||||
done
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
# Do not actualy add the carddav plugin if there's no carddav server available...
|
# Do not actualy add the cardDAV plugin if there's no carddav server available...
|
||||||
if [ $carddav_server -eq 1 ]
|
if [ $carddav_server -eq 1 ]
|
||||||
then
|
then
|
||||||
installed_plugins+=" 'carddav',"
|
installed_plugins+=" 'carddav',"
|
||||||
|
@ -225,7 +220,7 @@ chown -R root: "$final_path"
|
||||||
mkdir -p "$final_path/plugins/enigma/home"
|
mkdir -p "$final_path/plugins/enigma/home"
|
||||||
chown -R $app: "$final_path/"{temp,logs,plugins/enigma/home}
|
chown -R $app: "$final_path/"{temp,logs,plugins/enigma/home}
|
||||||
|
|
||||||
chmod 600 "$final_path/config/config.inc.php"
|
chmod 400 "$final_path/config/config.inc.php"
|
||||||
chown $app:$app "$final_path/config/config.inc.php"
|
chown $app:$app "$final_path/config/config.inc.php"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -144,17 +144,9 @@ then
|
||||||
ynh_script_progression --message="Reconfiguring Roundcube..."
|
ynh_script_progression --message="Reconfiguring Roundcube..."
|
||||||
|
|
||||||
rc_conf="$final_path/config/config.inc.php"
|
rc_conf="$final_path/config/config.inc.php"
|
||||||
|
deskey=$(ynh_string_random --length=24)
|
||||||
|
|
||||||
# Verify the checksum and backup the file if it's different
|
ynh_add_config --template="../conf/config.inc.php" --destination="$rc_conf"
|
||||||
ynh_backup_if_checksum_is_different "$rc_conf"
|
|
||||||
|
|
||||||
cp ../conf/config.inc.php "$rc_conf"
|
|
||||||
|
|
||||||
ynh_replace_string --match_string="__DESKEY__" --replace_string="$(ynh_string_random --length=24)" --target_file="$rc_conf"
|
|
||||||
ynh_replace_string --match_string="__DB_USER__" --replace_string=$db_name --target_file="$rc_conf"
|
|
||||||
ynh_replace_string --match_string="__DB_PWD__" --replace_string="$db_pwd" --target_file="$rc_conf"
|
|
||||||
ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$rc_conf"
|
|
||||||
ynh_replace_string --match_string="__LANGUAGE__" --replace_string="$language" --target_file="$rc_conf"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# UPDATE DEPENDENCIES WITH COMPOSER
|
# UPDATE DEPENDENCIES WITH COMPOSER
|
||||||
|
@ -275,7 +267,7 @@ chown -R root: "$final_path"
|
||||||
mkdir -p "$final_path/plugins/enigma/home"
|
mkdir -p "$final_path/plugins/enigma/home"
|
||||||
chown -R $app: "$final_path/"{temp,logs,plugins/enigma/home}
|
chown -R $app: "$final_path/"{temp,logs,plugins/enigma/home}
|
||||||
|
|
||||||
chmod 600 "$final_path/config/config.inc.php"
|
chmod 400 "$final_path/config/config.inc.php"
|
||||||
chown $app:$app "$final_path/config/config.inc.php"
|
chown $app:$app "$final_path/config/config.inc.php"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Reference in a new issue