mirror of
https://github.com/YunoHost-Apps/yourls_ynh.git
synced 2024-09-03 20:35:59 +02:00
fix
This commit is contained in:
parent
868d52564e
commit
58d6917bf7
2 changed files with 20 additions and 2 deletions
|
@ -1,11 +1,11 @@
|
||||||
# YOURLS for YunoHost
|
# YOURLS for YunoHost
|
||||||
|
|
||||||
[](https://dash.yunohost.org/appci/app/yourls)  
|
[](https://dash.yunohost.org/appci/app/yourls)  
|
||||||
[](https://install-app.yunohost.org/?app=yourls)
|
[](https://install-app.yunohost.org/?app=yourls)
|
||||||
|
|
||||||
*[Lire ce readme en français.](./README_fr.md)*
|
*[Lire ce readme en français.](./README_fr.md)*
|
||||||
|
|
||||||
> *This package allows you to install Yourls quickly and simply on a YunoHost server.
|
> *This package allows you to install YOURLS quickly and simply on a YunoHost server.
|
||||||
If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.*
|
If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/install) to learn how to install it.*
|
||||||
|
|
||||||
## Overview
|
## Overview
|
||||||
|
|
|
@ -109,11 +109,29 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=4
|
||||||
# Create a dedicated PHP-FPM config
|
# Create a dedicated PHP-FPM config
|
||||||
ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION --package="$extra_php_dependencies"
|
ynh_add_fpm_config --phpversion=$YNH_PHP_VERSION --package="$extra_php_dependencies"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# MODIFY A CONFIG FILE
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Modifying a config file..." --weight=2
|
||||||
|
|
||||||
# Verify the checksum and backup the file if it's different
|
# Verify the checksum and backup the file if it's different
|
||||||
ynh_backup_if_checksum_is_different --file="$final_path/user/config.php"
|
ynh_backup_if_checksum_is_different --file="$final_path/user/config.php"
|
||||||
|
|
||||||
|
sudo cp ../conf/config.php $final_path/user/config.php
|
||||||
|
|
||||||
|
ynh_replace_string --match_string="__DB_NAME__" --replace_string="$db_name" --target_file="$final_path/user/config.php"
|
||||||
|
ynh_replace_string --match_string="__DB_PASSWORD__" --replace_string="$db_pwd" --target_file="$final_path/user/config.php"
|
||||||
|
ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$final_path/user/config.php"
|
||||||
|
ynh_replace_string --match_string="__PATH__" --replace_string="${path_url%/}" --target_file="$final_path/user/config.php"
|
||||||
|
ynh_replace_string --match_string="__RANDOM__" --replace_string="$(ynh_string_random 24)" --target_file="$final_path/user/config.php"
|
||||||
|
|
||||||
# Recalculate and store the config file checksum into the app settings
|
# Recalculate and store the config file checksum into the app settings
|
||||||
ynh_store_file_checksum --file="$final_path/user/config.php"
|
ynh_store_file_checksum --file="$final_path/user/config.php"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# SECURE FILES AND DIRECTORIES
|
||||||
|
#=================================================
|
||||||
|
|
||||||
# Set right permissions for curl installation
|
# Set right permissions for curl installation
|
||||||
chown -R $app: $final_path
|
chown -R $app: $final_path
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue