mirror of
https://github.com/YunoHost-Apps/yourls_ynh.git
synced 2024-09-03 20:35:59 +02:00
commit
d48ea3e517
5 changed files with 17 additions and 14 deletions
|
@ -5,7 +5,7 @@ name = "Yourls"
|
|||
description.en = "URL shortening service"
|
||||
description.fr = "Service de raccourcisseur d'URL"
|
||||
|
||||
version = "1.9.2~ynh3"
|
||||
version = "1.9.2~ynh4"
|
||||
|
||||
maintainers = [""]
|
||||
|
||||
|
@ -20,8 +20,11 @@ code = "https://github.com/YOURLS/YOURLS"
|
|||
yunohost = ">= 11.2"
|
||||
architectures = "all"
|
||||
multi_instance = true
|
||||
|
||||
ldap = false
|
||||
|
||||
sso = false
|
||||
|
||||
disk = "50M"
|
||||
ram.build = "150M"
|
||||
ram.runtime = "50M"
|
||||
|
@ -48,7 +51,7 @@ ram.runtime = "50M"
|
|||
ask.en = "Choose the application language"
|
||||
ask.fr = "Choisissez la langue de l'application"
|
||||
type = "select"
|
||||
select = ["fr_FR", "en_US"]
|
||||
choices = ["fr_FR", "en_US"]
|
||||
default = "fr_FR"
|
||||
|
||||
[resources]
|
||||
|
|
|
@ -23,7 +23,7 @@ ynh_script_progression --message="Adding a configuration file..." --weight=1
|
|||
|
||||
domain=$new_domain
|
||||
path=$new_path
|
||||
ynh_add_config --template="../conf/config-sample.php" --destination="$install_dir/user/config.php"
|
||||
ynh_add_config --template="config-sample.php" --destination="$install_dir/user/config.php"
|
||||
|
||||
chmod 600 "$install_dir/user/config.php"
|
||||
chown $app:$app "$install_dir/user/config.php"
|
||||
|
|
|
@ -36,7 +36,7 @@ ynh_setup_source --dest_dir="$install_dir"
|
|||
ynh_setup_source --dest_dir="$install_dir/user/languages" --source_id="fr"
|
||||
|
||||
# copy index file
|
||||
cp ../conf/index.php $install_dir/
|
||||
ynh_add_config --template="index.php" --destination="$install_dir/index.php"
|
||||
|
||||
chmod -R o-rwx "$install_dir"
|
||||
chown -R $app:www-data "$install_dir"
|
||||
|
@ -50,14 +50,14 @@ ynh_script_progression --message="Configuring NGINX web server..." --weight=2
|
|||
ynh_add_nginx_config
|
||||
|
||||
# Create a dedicated PHP-FPM config
|
||||
ynh_add_fpm_config --usage=low --footprint=low
|
||||
ynh_add_fpm_config
|
||||
|
||||
#=================================================
|
||||
# ADD A CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Adding a configuration file..." --weight=1
|
||||
|
||||
ynh_add_config --template="../conf/config-sample.php" --destination="$install_dir/user/config.php"
|
||||
ynh_add_config --template="config-sample.php" --destination="$install_dir/user/config.php"
|
||||
|
||||
chmod 600 "$install_dir/user/config.php"
|
||||
chown $app:$app "$install_dir/user/config.php"
|
||||
|
|
|
@ -19,6 +19,13 @@ ynh_restore_file --origin_path="$install_dir"
|
|||
chmod -R o-rwx "$install_dir"
|
||||
chown -R $app:www-data "$install_dir"
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE MYSQL DATABASE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring the MySQL database..." --weight=5
|
||||
|
||||
ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
|
@ -28,13 +35,6 @@ ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
|||
|
||||
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE MYSQL DATABASE
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring the MySQL database..." --weight=5
|
||||
|
||||
ynh_mysql_connect_as --user=$db_user --password=$db_pwd --database=$db_name < ./db.sql
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
#=================================================
|
||||
|
|
|
@ -36,7 +36,7 @@ chown -R $app:www-data "$install_dir"
|
|||
ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=4
|
||||
|
||||
# Create a dedicated PHP-FPM config
|
||||
ynh_add_fpm_config --usage=low --footprint=low
|
||||
ynh_add_fpm_config
|
||||
|
||||
# Create a dedicated NGINX config
|
||||
ynh_add_nginx_config
|
||||
|
|
Loading…
Add table
Reference in a new issue