1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/freshrss_ynh.git synced 2024-09-03 18:36:33 +02:00

Fix linter warnings

This commit is contained in:
ericgaspar 2021-05-22 10:43:47 +02:00
parent 731e36d122
commit 28b9064e97
No known key found for this signature in database
GPG key ID: 574F281483054D44
4 changed files with 23 additions and 30 deletions

View file

@ -1,9 +1,9 @@
;; Test complet
auto_remove=1
; Manifest
domain="domain.tld" (DOMAIN)
path="/path" (PATH)
admin="homer" (USER)
domain="domain.tld"
path="/path"
admin="homer"
language="fr"
; Checks
pkg_linter=1
@ -16,13 +16,7 @@
upgrade=1 from_commit=0b1c3be0716e4800f2ed6f5b3065f707ed67b6bf
backup_restore=1
multi_instance=1
# This test is no longer necessary since the version 2.7 (PR: https://github.com/YunoHost/yunohost/pull/304), you can still do it if your app could be installed with this version.
# incorrect_path=1
port_already_use=0
change_url=1
;;; Levels
# If the level 5 (Package linter) is forced to 1. Please add justifications here.
Level 5=auto
;;; Upgrade options
; commit=0b1c3be0716e4800f2ed6f5b3065f707ed67b6bf
name=30 août 2020. Merge pull request #103 from ericgaspar/patch-1

View file

@ -14,12 +14,12 @@
"email": "plopoyop@gmail.com"
},
"requirements": {
"yunohost": ">= 3.8.1"
"yunohost": ">= 4.1.7"
},
"multi_instance": true,
"services": [
"nginx",
"php7.0-fpm",
"php7.3-fpm",
"mysql"
],
"arguments": {
@ -27,19 +27,11 @@
{
"name": "domain",
"type": "domain",
"ask": {
"en": "Choose a domain name for FreshRSS",
"fr": "Choisissez un nom de domaine pour FreshRSS"
},
"example": "domain.org"
},
{
"name": "path",
"type": "path",
"ask": {
"en": "Choose a path for FreshRSS",
"fr": "Choisissez un chemin pour FreshRSS"
},
"example": "/rss",
"default": "/rss"
},
@ -47,10 +39,6 @@
"name": "admin",
"type": "user",
"optional": false,
"ask": {
"en": "Choose an admin user",
"fr": "Choisissez ladministrateur"
},
"example": "homer"
},
{

View file

@ -45,6 +45,23 @@ if [ -z $admin ]; then
ynh_app_setting_set $app admin $admin
fi
#=================================================
# BACKUP BEFORE CHANGE URL THEN ACTIVE TRAP
#=================================================
ynh_script_progression --message="Backing up the app before changing its URL (may take a while)..."
# Backup the current version of the app
ynh_backup_before_upgrade
ynh_clean_setup () {
# Remove the new domain config file, the remove script won't do it as it doesn't know yet its location.
ynh_secure_remove --file="/etc/nginx/conf.d/$new_domain.d/$app.conf"
# Restore it if the upgrade fails
ynh_restore_upgradebackup
}
# Exit if an error occurs during the execution of the script
ynh_abort_if_errors
#=================================================
# CHECK PATHS SYNTAX
#=================================================

View file

@ -126,13 +126,7 @@ done
#=================================================
ynh_script_progression --message="Setting up cron..."
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="__APP__" --replace_string=$app --target_file="../conf/freshrss.cron"
ynh_replace_string --match_string="__PHPVERSION__" --replace_string=$phpversion --target_file="../conf/freshrss.cron"
cp ../conf/freshrss.cron "$cron_path"
ynh_add_config --template="../conf/freshrss.cron" --destination="/etc/cron.d/$app"
chmod 644 "$cron_path"
#=================================================