mirror of
https://github.com/YunoHost-Apps/grocy_ynh.git
synced 2024-09-03 19:25:54 +02:00
Fix
This commit is contained in:
parent
a27723e872
commit
a136314b1a
4 changed files with 30 additions and 23 deletions
|
@ -3,8 +3,8 @@
|
|||
"id": "grocy",
|
||||
"packaging_format": 1,
|
||||
"description": {
|
||||
"en": "Issue tracker that provides a balance between simplicity and power",
|
||||
"fr": "Gestionnaire de ticket avec un équilibre entre simplicité et puissance"
|
||||
"en": "Web-based self-hosted groceries & household management solution for your home",
|
||||
"fr": "Solution Web auto-hébergée de gestion d'épicerie et de gestion de la maison"
|
||||
},
|
||||
"version": "3.0.0~ynh1",
|
||||
"url": "https://github.com/grocy/grocy",
|
||||
|
@ -48,7 +48,7 @@
|
|||
"en": "Choose the application language",
|
||||
"fr": "Choisissez la langue de l'application"
|
||||
},
|
||||
"choices": ["fr", "en"],
|
||||
"choices": ["de", "en", "es", "fr", "it", "pt"],
|
||||
"default": "fr"
|
||||
},
|
||||
{
|
||||
|
|
|
@ -88,10 +88,7 @@ phpversion=$(ynh_app_setting_get --app="$app" --key=phpversion)
|
|||
|
||||
cp -a ../conf/config-dist.php "$final_path/data/config.php"
|
||||
|
||||
#ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$final_path/data/config.php"
|
||||
#ynh_replace_string --match_string="__PATH_URL__" --replace_string="$path_url" --target_file="$final_path/data/config.php"
|
||||
ynh_replace_string --match_string="__LANGUAGE__" --replace_string="$language" --target_file="$final_path/data/config.php"
|
||||
#ynh_replace_string --match_string="__APP__" --replace_string="$app" --target_file="$final_path/data/config.php"
|
||||
|
||||
#=================================================
|
||||
# STORE THE CONFIG FILE CHECKSUM
|
||||
|
@ -108,6 +105,13 @@ ynh_store_file_checksum --file="$final_path/data/config.php"
|
|||
# Set permissions to app files
|
||||
chown -R $app: $final_path
|
||||
|
||||
#=================================================
|
||||
# INTEGRATE SERVICE IN YUNOHOST
|
||||
#=================================================
|
||||
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
|
||||
|
||||
yunohost service add $app --description="Self-hosted groceries & household management" --log="/var/log/$app/$app.log"
|
||||
|
||||
#=================================================
|
||||
# SETUP SSOWAT
|
||||
#=================================================
|
||||
|
|
|
@ -61,6 +61,16 @@ ynh_script_progression --message="Recreating the dedicated system user..." --wei
|
|||
# Create the dedicated user (if not existing)
|
||||
ynh_system_user_create --username=$app
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE PHP-FPM CONFIGURATION
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring PHP-FPM configuration..."
|
||||
|
||||
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
||||
|
||||
# Recreate a dedicated PHP-FPM config
|
||||
ynh_add_fpm_config --package="$extra_php_dependencies"
|
||||
|
||||
#=================================================
|
||||
# RESTORE USER RIGHTS
|
||||
#=================================================
|
||||
|
@ -69,14 +79,11 @@ ynh_system_user_create --username=$app
|
|||
chown -R $app: $final_path
|
||||
|
||||
#=================================================
|
||||
# RESTORE THE PHP-FPM CONFIGURATION
|
||||
# INTEGRATE SERVICE IN YUNOHOST
|
||||
#=================================================
|
||||
ynh_script_progression --message="Restoring PHP-FPM configuration..."
|
||||
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
|
||||
|
||||
ynh_restore_file --origin_path="/etc/php/$phpversion/fpm/pool.d/$app.conf"
|
||||
|
||||
# Recreate a dedicated php-fpm config
|
||||
ynh_add_fpm_config --usage=low --footprint=low --package="$extra_php_dependencies"
|
||||
yunohost service add $app --description="Self-hosted groceries & household management" --log="/var/log/$app/$app.log"
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALIZATION
|
||||
|
|
|
@ -34,15 +34,6 @@ upgrade_type=$(ynh_check_app_version_changed)
|
|||
#=================================================
|
||||
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1
|
||||
|
||||
# Fix is_public as a boolean value
|
||||
if [ "$is_public" = "Yes" ]; then
|
||||
ynh_app_setting_set --app=$app --key=is_public --value=1
|
||||
is_public=1
|
||||
elif [ "$is_public" = "No" ]; then
|
||||
ynh_app_setting_set --app=$app --key=is_public --value=0
|
||||
is_public=0
|
||||
fi
|
||||
|
||||
# If final_path doesn't exist, create it
|
||||
if [ -z "$final_path" ]; then
|
||||
final_path=/var/www/$app
|
||||
|
@ -112,10 +103,15 @@ ynh_add_fpm_config --package="$extra_php_dependencies"
|
|||
|
||||
cp -a ../conf/config-dist.php "$final_path/config-dist.php"
|
||||
|
||||
#ynh_replace_string --match_string="__DOMAIN__" --replace_string="$domain" --target_file="$final_path/data/config.php"
|
||||
#ynh_replace_string --match_string="__PATH_URL__" --replace_string="$path_url" --target_file="$final_path/data/config.php"
|
||||
ynh_replace_string --match_string="__LANGUAGE__" --replace_string="$language" --target_file="$final_path/data/config.php"
|
||||
|
||||
#=================================================
|
||||
# INTEGRATE SERVICE IN YUNOHOST
|
||||
#=================================================
|
||||
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
|
||||
|
||||
yunohost service add $app --description="Self-hosted groceries & household management" --log="/var/log/$app/$app.log"
|
||||
|
||||
#=================================================
|
||||
# RELOAD NGINX
|
||||
#=================================================
|
||||
|
|
Loading…
Add table
Reference in a new issue