1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/lidarr_ynh.git synced 2024-09-03 19:35:58 +02:00
This commit is contained in:
ericgaspar 2021-11-22 23:49:33 +01:00
parent 6aa6c0298b
commit 94a1d5ee93
No known key found for this signature in database
GPG key ID: 574F281483054D44
13 changed files with 10 additions and 69 deletions

View file

@ -1,14 +1,8 @@
# See here for more information
# https://github.com/YunoHost/package_check#syntax-check_process-file
# Move this file from check_process.default to check_process when you have filled it.
;; Test complet
; Manifest
domain="domain.tld"
path="/path"
admin="john"
port="666"
; Checks
pkg_linter=1
setup_sub_dir=1
@ -20,7 +14,6 @@
#upgrade=1 from_commit=CommitHash
backup_restore=1
multi_instance=1
port_already_use=0
change_url=1
;;; Options
Email=

View file

@ -1,7 +0,0 @@
SOURCE_URL=https://github.com/Lidarr/Lidarr/releases/download/v__VERSION__/Lidarr.master.__VERSION__.linux-core-__ARCHITECTURE__.tar.gz
SOURCE_SUM=__CHECKSUM__
SOURCE_SUM_PRG=sha256sum
SOURCE_FORMAT=tar.gz
SOURCE_IN_SUBDIR=true
SOURCE_EXTRACT=true
SOURCE_FILENAME=lidarr.tar.gz

View file

@ -1,11 +1,6 @@
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
location __PATH__ {
# Force usage of https
if ($scheme = http) {
rewrite ^ https://$server_name$request_uri? permanent;
}
proxy_pass http://127.0.0.1:__PORT____PATH__;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;

View file

@ -3,8 +3,8 @@
"id": "lidarr",
"packaging_format": 1,
"description": {
"en": "A music collection manager for Usenet and BitTorrent users.",
"fr": "Un gestionnaire de discothèque pour utilisateurs de Usenet et BitTorrent."
"en": "Music collection manager for Usenet and BitTorrent users",
"fr": "Gestionnaire de discothèque pour utilisateurs de Usenet et BitTorrent"
},
"version": "0.8.1.2135~ynh1",
"url": "https://lidarr.audio",
@ -20,7 +20,7 @@
"email": "tituspijean@outlook.com"
},
"requirements": {
"yunohost": ">= 4.2"
"yunohost": ">= 4.3.0"
},
"multi_instance": true,
"services": [
@ -32,8 +32,7 @@
"install" : [
{
"name": "domain",
"type": "domain",
"example": "example.com"
"type": "domain"
},
{
"name": "path",
@ -43,8 +42,7 @@
},
{
"name": "admin",
"type": "user",
"example": "johndoe"
"type": "user"
}
]
}

View file

@ -6,9 +6,6 @@
version="0.8.1.2135"
# Supported architectures
supported_architectures=("arm" "arm64" "x64")
# dependencies used by the app
pkg_dependencies="curl mediainfo sqlite3"
@ -16,19 +13,6 @@ pkg_dependencies="curl mediainfo sqlite3"
# PERSONAL HELPERS
#=================================================
get_architecture() {
architecture=$(dpkg --print-architecture)
if [ $architecture = "amd64" ]; then
architecture="x64"
elif [[ $architecture = arm* ]] && [[ $(getconf LONG_BIT) = 32 ]]; then
architecture="arm"
elif [[ $architecture = arm* ]] && [[ $(getconf LONG_BIT) = 64 ]]; then
architecture="arm64"
elif [[ $(echo ${supported_architectures[@]} | grep -ow "$architecture" | wc -w) = 0 ]]; then
ynh_die --message="Unsupported architecture $architecture"
fi
}
#=================================================
# EXPERIMENTAL HELPERS
#=================================================

View file

@ -36,11 +36,6 @@ domain=$(ynh_app_setting_get --app=$app --key=domain)
#=================================================
ynh_print_info --message="Declaring files to be backed up..."
### N.B. : the following 'ynh_backup' calls are only a *declaration* of what needs
### to be backuped and not an actual copy of any file. The actual backup that
### creates and fill the archive with the files happens in the core after this
### script is called. Hence ynh_backups calls takes basically 0 seconds to run.
#=================================================
# BACKUP THE APP MAIN DIR
#=================================================

View file

@ -27,6 +27,7 @@ ynh_abort_if_errors
domain=$YNH_APP_ARG_DOMAIN
path_url=$YNH_APP_ARG_PATH
admin=$YNH_APP_ARG_ADMIN
architecture=$YNH_ARCH
app=$YNH_APP_INSTANCE_NAME
@ -85,7 +86,7 @@ get_architecture
ynh_app_setting_set --app=$app --key=final_path --value=$final_path
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$final_path" --source_id="app.$architecture"
ynh_setup_source --dest_dir="$final_path" --source_id="$architecture"
mkdir -p "$final_path/.data/logs"

View file

@ -73,16 +73,6 @@ ynh_script_progression --message="Removing logrotate configuration..." --weight=
# Remove the app-specific logrotate config
ynh_remove_logrotate
#=================================================
# CLOSE A PORT
#=================================================
if yunohost firewall list | grep -q "\- $port$"
then
ynh_script_progression --message="Closing port $port..." --weight=1
ynh_exec_warn_less yunohost firewall disallow TCP $port
fi
#=================================================
# SPECIFIC REMOVE
#=================================================

View file

@ -37,10 +37,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
#=================================================
ynh_script_progression --message="Validating restoration parameters..." --weight=1
ynh_webpath_available --domain=$domain --path_url=$path_url \
|| ynh_die --message="Path not available: ${domain}${path_url}"
test ! -d $final_path \
|| ynh_die --message="There is already a directory: $final_path "
test ! -d $final_path || ynh_die --message="There is already a directory: $final_path "
#=================================================
# STANDARD RESTORATION STEPS

View file

@ -21,17 +21,12 @@ path_url=$(ynh_app_setting_get --app=$app --key=path)
admin=$(ynh_app_setting_get --app=$app --key=admin)
port=$(ynh_app_setting_get --app=$app --key=port)
final_path=$(ynh_app_setting_get --app=$app --key=final_path)
architecture=$YNH_ARCH
#=================================================
# CHECK VERSION
#=================================================
### This helper will compare the version of the currently installed app and the version of the upstream package.
### $upgrade_type can have 2 different values
### - UPGRADE_APP if the upstream app version has changed
### - UPGRADE_PACKAGE if only the YunoHost package has changed
### ynh_check_app_version_changed will stop the upgrade if the app is up to date.
### UPGRADE_APP should be used to upgrade the core app only if there's an upgrade to do.
upgrade_type=$(ynh_check_app_version_changed)
#=================================================
@ -86,7 +81,7 @@ then
get_architecture
# Download, check integrity, uncompress and patch the source from app.src
ynh_setup_source --dest_dir="$final_path" --source_id="app.$architecture"
ynh_setup_source --dest_dir="$final_path" --source_id="$architecture"
fi
mkdir -p "$final_path/.data/logs"