1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/freshrss_ynh.git synced 2024-09-03 18:36:33 +02:00
This commit is contained in:
ericgaspar 2020-09-04 22:39:46 +02:00
parent 9b713b904d
commit df47834de7
No known key found for this signature in database
GPG key ID: 574F281483054D44
7 changed files with 17 additions and 11 deletions

View file

@ -3,8 +3,8 @@
"id": "freshrss", "id": "freshrss",
"packaging_format": 1, "packaging_format": 1,
"description": { "description": {
"en": "An RSS aggregator with a nice and mobile-friendly design", "en": "RSS aggregator with a nice and mobile-friendly design",
"fr": "Un agrégateur de flux RSS avec une interface adaptée au mobile" "fr": "Agrégateur de flux RSS avec une interface adaptée au mobile"
}, },
"version": "1.16.2~ynh1", "version": "1.16.2~ynh1",
"url": "http://freshrss.org/", "url": "http://freshrss.org/",

View file

@ -4,7 +4,7 @@
# COMMON VARIABLES # COMMON VARIABLES
#================================================= #=================================================
pkg_dependencies="php${YNH_PHP_VERSION}-gd php-zip php${YNH_PHP_VERSION}-dom php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-gmp php${YNH_PHP_VERSION}-sqlite3 php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-xml" pkg_dependencies="php${YNH_PHP_VERSION}-gd php${YNH_PHP_VERSION}-zip php${YNH_PHP_VERSION}-dom php${YNH_PHP_VERSION}-mbstring php${YNH_PHP_VERSION}-gmp php${YNH_PHP_VERSION}-sqlite3 php${YNH_PHP_VERSION}-curl php${YNH_PHP_VERSION}-intl php${YNH_PHP_VERSION}-xml"
YNH_PHP_VERSION="7.3" YNH_PHP_VERSION="7.3"

View file

@ -26,6 +26,7 @@ app=$YNH_APP_INSTANCE_NAME
final_path=$(ynh_app_setting_get --app=$app --key=final_path) final_path=$(ynh_app_setting_get --app=$app --key=final_path)
domain=$(ynh_app_setting_get --app=$app --key=domain) domain=$(ynh_app_setting_get --app=$app --key=domain)
db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_name=$(ynh_app_setting_get --app=$app --key=db_name)
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
#================================================= #=================================================
# DECLARE DATA AND CONF FILES TO BACKUP # DECLARE DATA AND CONF FILES TO BACKUP

View file

@ -130,8 +130,10 @@ done
ynh_script_progression --message="Setting up cron..." ynh_script_progression --message="Setting up cron..."
cron_path="/etc/cron.d/$app" cron_path="/etc/cron.d/$app"
ynh_replace_string --match_string="__FINALPATH__" --replace_string=$final_path --target_file="../conf/freshrss.cron" ynh_replace_string --match_string="__FINALPATH__" --replace_string=$final_path --target_file="../conf/freshrss.cron"
ynh_replace_string --match_string="__APP__" --replace_string=$app --target_file="../conf/freshrss.cron" ynh_replace_string --match_string="__APP__" --replace_string=$app --target_file="../conf/freshrss.cron"
cp ../conf/freshrss.cron "$cron_path" cp ../conf/freshrss.cron "$cron_path"
chmod 644 "$cron_path" chmod 644 "$cron_path"
@ -158,7 +160,7 @@ ynh_app_setting_delete --app="$app" --key=unprotected_uris
#================================================= #=================================================
# RELOAD NGINX # RELOAD NGINX
#================================================= #=================================================
ynh_script_progression --message="Reloading nginx web server..." ynh_script_progression --message="Reloading NGINX web server..."
ynh_systemd_action --service_name=nginx --action=reload ynh_systemd_action --service_name=nginx --action=reload

View file

@ -40,7 +40,7 @@ ynh_remove_app_dependencies
#================================================= #=================================================
# REMOVE APP MAIN DIR # REMOVE APP MAIN DIR
#================================================= #=================================================
ynh_script_progression --message="Removing app main directory..." ynh_script_progression --message="Removing $app main directory..."
# Remove the app directory securely # Remove the app directory securely
ynh_secure_remove --file="$final_path" ynh_secure_remove --file="$final_path"
@ -48,9 +48,9 @@ ynh_secure_remove --file="$final_path"
#================================================= #=================================================
# REMOVE NGINX CONFIGURATION # REMOVE NGINX CONFIGURATION
#================================================= #=================================================
ynh_script_progression --message="Removing nginx web server configuration..." ynh_script_progression --message="Removing NGINX web server configuration..."
# Remove the dedicated nginx config # Remove the dedicated NGINX config
ynh_remove_nginx_config ynh_remove_nginx_config
#================================================= #=================================================

View file

@ -28,6 +28,7 @@ path_url=$(ynh_app_setting_get --app=$app --key=path)
final_path=$(ynh_app_setting_get --app=$app --key=final_path) final_path=$(ynh_app_setting_get --app=$app --key=final_path)
db_name=$(ynh_app_setting_get --app=$app --key=db_name) db_name=$(ynh_app_setting_get --app=$app --key=db_name)
db_user=$db_name db_user=$db_name
phpversion=$(ynh_app_setting_get --app=$app --key=phpversion)
#================================================= #=================================================
# CHECK IF THE APP CAN BE RESTORED # CHECK IF THE APP CAN BE RESTORED

View file

@ -117,7 +117,7 @@ ynh_system_user_create $app
#================================================= #=================================================
ynh_script_progression --message="Upgrading PHP-FPM configuration..." ynh_script_progression --message="Upgrading PHP-FPM configuration..."
# Create a dedicated php-fpm config # Create a dedicated PHP-FPM config
ynh_add_fpm_config ynh_add_fpm_config
#================================================= #=================================================
@ -151,8 +151,10 @@ ynh_replace_string --match_string="APPNAMETOCHANGE" --replace_string=$app --targ
ynh_script_progression --message="Setting up cron..." ynh_script_progression --message="Setting up cron..."
cron_path="/etc/cron.d/$app" cron_path="/etc/cron.d/$app"
ynh_replace_string "__FINALPATH__" $final_path ../conf/freshrss.cron
ynh_replace_string "__APP__" $app ../conf/freshrss.cron ynh_replace_string --match_string="__FINALPATH__" --replace_string=$final_path --target_file="../conf/freshrss.cron"
ynh_replace_string --match_string="__APP__" --replace_string=$app --target_file="../conf/freshrss.cron"
cp ../conf/freshrss.cron "$cron_path" cp ../conf/freshrss.cron "$cron_path"
chmod 644 "$cron_path" chmod 644 "$cron_path"
@ -186,7 +188,7 @@ ynh_app_setting_delete --app="$app" --key=unprotected_uris
#================================================= #=================================================
# RELOAD NGINX # RELOAD NGINX
#================================================= #=================================================
ynh_script_progression --message="Reloading nginx web server..." ynh_script_progression --message="Reloading NGINX web server..."
ynh_systemd_action --service_name=nginx --action=reload ynh_systemd_action --service_name=nginx --action=reload