1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/grocy_ynh.git synced 2024-09-03 19:25:54 +02:00
This commit is contained in:
ericgaspar 2020-12-26 18:33:59 +01:00
parent a27723e872
commit a136314b1a
No known key found for this signature in database
GPG key ID: 574F281483054D44
4 changed files with 30 additions and 23 deletions

View file

@ -3,8 +3,8 @@
"id": "grocy", "id": "grocy",
"packaging_format": 1, "packaging_format": 1,
"description": { "description": {
"en": "Issue tracker that provides a balance between simplicity and power", "en": "Web-based self-hosted groceries & household management solution for your home",
"fr": "Gestionnaire de ticket avec un équilibre entre simplicité et puissance" "fr": "Solution Web auto-hébergée de gestion d'épicerie et de gestion de la maison"
}, },
"version": "3.0.0~ynh1", "version": "3.0.0~ynh1",
"url": "https://github.com/grocy/grocy", "url": "https://github.com/grocy/grocy",
@ -48,7 +48,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", "en"], "choices": ["de", "en", "es", "fr", "it", "pt"],
"default": "fr" "default": "fr"
}, },
{ {

View file

@ -88,10 +88,7 @@ phpversion=$(ynh_app_setting_get --app="$app" --key=phpversion)
cp -a ../conf/config-dist.php "$final_path/data/config.php" 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="__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 # STORE THE CONFIG FILE CHECKSUM
@ -108,6 +105,13 @@ ynh_store_file_checksum --file="$final_path/data/config.php"
# Set permissions to app files # Set permissions to app files
chown -R $app: $final_path 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 # SETUP SSOWAT
#================================================= #=================================================

View file

@ -61,6 +61,16 @@ ynh_script_progression --message="Recreating the dedicated system user..." --wei
# Create the dedicated user (if not existing) # Create the dedicated user (if not existing)
ynh_system_user_create --username=$app 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 # RESTORE USER RIGHTS
#================================================= #=================================================
@ -69,14 +79,11 @@ ynh_system_user_create --username=$app
chown -R $app: $final_path 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" yunohost service add $app --description="Self-hosted groceries & household management" --log="/var/log/$app/$app.log"
# Recreate a dedicated php-fpm config
ynh_add_fpm_config --usage=low --footprint=low --package="$extra_php_dependencies"
#================================================= #=================================================
# GENERIC FINALIZATION # GENERIC FINALIZATION

View file

@ -34,15 +34,6 @@ upgrade_type=$(ynh_check_app_version_changed)
#================================================= #=================================================
ynh_script_progression --message="Ensuring downward compatibility..." --weight=1 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 final_path doesn't exist, create it
if [ -z "$final_path" ]; then if [ -z "$final_path" ]; then
final_path=/var/www/$app 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" 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" 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 # RELOAD NGINX
#================================================= #=================================================