diff --git a/scripts/install b/scripts/install index e299948..1d5c11e 100755 --- a/scripts/install +++ b/scripts/install @@ -30,8 +30,10 @@ is_public=$YNH_APP_ARG_IS_PUBLIC language=$YNH_APP_ARG_LANGUAGE admin=$YNH_APP_ARG_ADMIN password=$YNH_APP_ARG_PASSWORD +timezone="$(cat /etc/timezone)" + # passhash=php hash.php $password -# phpversion=$YNH_PHP_VERSION +phpversion=$YNH_PHP_VERSION ### If it's a multi-instance app, meaning it can be installed several times independently ### The id of the app as stated in the manifest is available as $YNH_APP_ID @@ -259,6 +261,10 @@ ynh_add_config --template="../conf/config.php" --destination="$final_path/config chmod 600 "$final_path/config.php" chown $app:$app "$final_path/config.php" +ynh_replace_string --match_string='$CONFIG = '{"lang":"en","error_reporting":false,"show_hidden":false,"hide_Cols":false,"calc_folder":false,"theme":"light"}';' + --replace_string='$CONFIG = '{"lang":"$language","error_reporting":false,"show_hidden":true,"hide_Cols":false,"calc_folder":false,"theme":"light"}';' + --target_file="$final_path/index.php" + ### For more complex cases where you want to replace stuff using regexes, ### you shoud rely on ynh_replace_string (which is basically a wrapper for sed) ### When doing so, you also need to manually call ynh_store_file_checksum @@ -311,7 +317,7 @@ chown $app:$app "$final_path/config.php" #================================================= # SETUP LOGROTATE #================================================= -ynh_script_progression --message="Configuring log rotation..." --time --weight=1 +#ynh_script_progression --message="Configuring log rotation..." --time --weight=1 ### `ynh_use_logrotate` is used to configure a logrotate configuration for the logs of this app. ### Use this helper only if there is effectively a log file for this app. @@ -322,7 +328,7 @@ ynh_script_progression --message="Configuring log rotation..." --time --weight=1 ### - And the section "SETUP LOGROTATE" in the upgrade script # Use logrotate to manage application logfile(s) -ynh_use_logrotate +# ynh_use_logrotate #================================================= # INTEGRATE SERVICE IN YUNOHOST