mirror of
https://github.com/YunoHost-Apps/jackett_ynh.git
synced 2024-09-03 19:26:28 +02:00
0.20.53
This commit is contained in:
parent
9bfe8d694a
commit
cbfa22d032
13 changed files with 19 additions and 122 deletions
|
@ -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"
|
||||
is_public=1
|
||||
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=
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
SOURCE_URL=https://github.com/Jackett/Jackett/releases/download/v0.18.98/Jackett.Binaries.LinuxARM64.tar.gz
|
||||
SOURCE_SUM=0f936344d82e155a2dcb904d2f47bbcfc85ebae6484879f7790a108db021a4d6
|
||||
SOURCE_URL=https://github.com/Jackett/Jackett/releases/download/v0.20.53/Jackett.Binaries.LinuxAMDx64.tar.gz
|
||||
SOURCE_SUM=ea6283621b5c1a61dc4613b27261d010bf959520db530939767a4be8e925f5dd
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=tar.gz
|
||||
SOURCE_IN_SUBDIR=true
|
|
@ -1,7 +0,0 @@
|
|||
SOURCE_URL=url of app's source
|
||||
SOURCE_SUM=sha256 checksum
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=tar.gz
|
||||
SOURCE_IN_SUBDIR=true
|
||||
SOURCE_FILENAME=
|
||||
SOURCE_EXTRACT=true
|
|
@ -1,7 +1,7 @@
|
|||
SOURCE_URL=https://github.com/Jackett/Jackett/releases/download/v0.18.98/Jackett.Binaries.LinuxAMDx64.tar.gz
|
||||
SOURCE_SUM=d63e783faa4a443ac81876dacc1e54e66ffd1022fa056430a57964b1c92efc84
|
||||
SOURCE_URL=https://github.com/Jackett/Jackett/releases/download/v0.20.53/Jackett.Binaries.LinuxARM64.tar.gz
|
||||
SOURCE_SUM=aa51da64c79511901bf40c552c198a3046c61309cc2495795f8b7087893acd52
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=tar.gz
|
||||
SOURCE_IN_SUBDIR=true
|
||||
SOURCE_EXTRACT=true
|
||||
SOURCE_FILENAME=jackett.tar.gz
|
||||
SOURCE_FILENAME=jackett.tar.gz
|
|
@ -1,5 +1,5 @@
|
|||
SOURCE_URL=https://github.com/Jackett/Jackett/releases/download/v0.18.98/Jackett.Binaries.LinuxARM32.tar.gz
|
||||
SOURCE_SUM=23a704eef13a41a8e4a17830de330f5ff1176f47e7040714b3df90d7733239dc
|
||||
SOURCE_URL=https://github.com/Jackett/Jackett/releases/download/v0.20.53/Jackett.Binaries.LinuxARM32.tar.gz
|
||||
SOURCE_SUM=77197e9a617664a1950534154de3d057c9c9e04bab6ef7f1d1c917c541ed8643
|
||||
SOURCE_SUM_PRG=sha256sum
|
||||
SOURCE_FORMAT=tar.gz
|
||||
SOURCE_IN_SUBDIR=true
|
|
@ -1,10 +1,5 @@
|
|||
#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:9117;
|
||||
proxy_set_header X-Real-IP $remote_addr;
|
||||
|
@ -12,6 +7,7 @@ location __PATH__ {
|
|||
proxy_set_header X-Forwarded-Proto $scheme;
|
||||
proxy_set_header X-Forwarded-Host $http_host;
|
||||
proxy_redirect off;
|
||||
|
||||
# Allow the Jackett API
|
||||
location __PATH__/api {
|
||||
auth_request off;
|
||||
|
|
|
@ -3,17 +3,15 @@
|
|||
"id": "jackett",
|
||||
"packaging_format": 1,
|
||||
"description": {
|
||||
"en": "It provides API support for your favorite torrent trackers.",
|
||||
"fr": "Expliquez en *quelques* (10~15) mots l'utilité de l'app ou ce qu'elle fait (l'objectif est de donner une idée grossière pour des utilisateurs qui naviguent dans un catalogue de 100+ apps)"
|
||||
"en": "API support for your favorite torrent trackers",
|
||||
"fr": "API pour vos trackers torrent préférés"
|
||||
},
|
||||
"version": "0.18.98~ynh1",
|
||||
"url": "https://example.com",
|
||||
"version": "0.20.53~ynh1",
|
||||
"url": "https://github.com/Jackett/Jackett",
|
||||
"upstream": {
|
||||
"license": "GPL-2.0",
|
||||
"website": "https://github.com/Jackett/Jackett",
|
||||
"demo": "https://github.com/Jackett/Jackett",
|
||||
"admindoc": "https://yunohost.org/packaging_apps",
|
||||
"userdoc": "https://yunohost.org/apps",
|
||||
"code": "https://github.com/Jackett/Jackett"
|
||||
},
|
||||
"license": "GPL-2.0",
|
||||
|
@ -22,7 +20,7 @@
|
|||
"email": "navanchauhan+yunohost@gmail.com"
|
||||
},
|
||||
"requirements": {
|
||||
"yunohost": ">= 4.1.3"
|
||||
"yunohost": ">= 4.3.0"
|
||||
},
|
||||
"multi_instance": true,
|
||||
"services": [
|
||||
|
@ -32,8 +30,7 @@
|
|||
"install" : [
|
||||
{
|
||||
"name": "domain",
|
||||
"type": "domain",
|
||||
"example": "example.com"
|
||||
"type": "domain"
|
||||
},
|
||||
{
|
||||
"name": "path",
|
||||
|
@ -43,9 +40,6 @@
|
|||
},
|
||||
{
|
||||
"name": "is_public",
|
||||
"help": {
|
||||
"en": "Should the user interface be exposed to the public"
|
||||
},
|
||||
"type": "boolean",
|
||||
"default": true
|
||||
}
|
||||
|
|
|
@ -4,26 +4,10 @@
|
|||
# COMMON VARIABLES
|
||||
#=================================================
|
||||
|
||||
# Supported architectures
|
||||
supported_architectures=("arm" "arm64" "x64")
|
||||
|
||||
#=================================================
|
||||
# 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
|
||||
#=================================================
|
||||
|
|
|
@ -105,12 +105,6 @@ then
|
|||
ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf"
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC MODIFICATIONS
|
||||
#=================================================
|
||||
# ...
|
||||
#=================================================
|
||||
|
||||
#=================================================
|
||||
# GENERIC FINALISATION
|
||||
#=================================================
|
||||
|
|
|
@ -23,6 +23,7 @@ ynh_abort_if_errors
|
|||
domain=$YNH_APP_ARG_DOMAIN
|
||||
path_url=$YNH_APP_ARG_PATH
|
||||
is_public=$YNH_APP_ARG_IS_PUBLIC
|
||||
architecture=$YNH_ARCH
|
||||
|
||||
app=$YNH_APP_INSTANCE_NAME
|
||||
|
||||
|
@ -74,14 +75,8 @@ 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"
|
||||
|
||||
# FIXME: this should be managed by the core in the future
|
||||
# Here, as a packager, you may have to tweak the ownerhsip/permissions
|
||||
# such that the appropriate users (e.g. maybe www-data) can access
|
||||
# files in some cases.
|
||||
# But FOR THE LOVE OF GOD, do not allow r/x for "others" on the entire folder -
|
||||
# this will be treated as a security issue.
|
||||
chmod 750 "$final_path"
|
||||
chmod -R o-rwx "$final_path"
|
||||
chown -R $app: $final_path
|
||||
|
|
|
@ -65,16 +65,6 @@ ynh_script_progression --message="Removing logrotate configuration..."
|
|||
# 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..."
|
||||
ynh_exec_warn_less yunohost firewall disallow TCP $port
|
||||
fi
|
||||
|
||||
#=================================================
|
||||
# SPECIFIC REMOVE
|
||||
#=================================================
|
||||
|
|
|
@ -37,8 +37,6 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
|||
#=================================================
|
||||
ynh_script_progression --message="Validating restoration parameters..."
|
||||
|
||||
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 "
|
||||
|
||||
|
@ -66,12 +64,6 @@ ynh_script_progression --message="Restoring the app main directory..."
|
|||
|
||||
ynh_restore_file --origin_path="$final_path"
|
||||
|
||||
# FIXME: this should be managed by the core in the future
|
||||
# Here, as a packager, you may have to tweak the ownerhsip/permissions
|
||||
# such that the appropriate users (e.g. maybe www-data) can access
|
||||
# files in some cases.
|
||||
# But FOR THE LOVE OF GOD, do not allow r/x for "others" on the entire folder -
|
||||
# this will be treated as a security issue.
|
||||
chmod 750 "$final_path"
|
||||
chmod -R o-rwx "$final_path"
|
||||
chown -R $app:www-data "$final_path"
|
||||
|
@ -125,4 +117,4 @@ ynh_systemd_action --service_name=nginx --action=reload
|
|||
# END OF SCRIPT
|
||||
#=================================================
|
||||
|
||||
ynh_script_progression --message="Restoration completed for $app" --time --last
|
||||
ynh_script_progression --message="Restoration completed for $app" --last
|
||||
|
|
|
@ -19,17 +19,12 @@ app=$YNH_APP_INSTANCE_NAME
|
|||
domain=$(ynh_app_setting_get --app=$app --key=domain)
|
||||
path_url=$(ynh_app_setting_get --app=$app --key=path)
|
||||
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)
|
||||
|
||||
#=================================================
|
||||
|
@ -60,27 +55,6 @@ ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app
|
|||
#=================================================
|
||||
ynh_script_progression --message="Ensuring downward compatibility..."
|
||||
|
||||
#
|
||||
# N.B. : the followings setting migrations snippets are provided as *EXAMPLES*
|
||||
# of what you may want to do in some cases (e.g. a setting was not defined on
|
||||
# some legacy installs and you therefore want to initiaze stuff during upgrade)
|
||||
#
|
||||
|
||||
# If db_name doesn't exist, create it
|
||||
#if [ -z "$db_name" ]; then
|
||||
# db_name=$(ynh_sanitize_dbid --db_name=$app)
|
||||
# ynh_app_setting_set --app=$app --key=db_name --value=$db_name
|
||||
#fi
|
||||
|
||||
# If final_path doesn't exist, create it
|
||||
#if [ -z "$final_path" ]; then
|
||||
# final_path=/var/www/$app
|
||||
# ynh_app_setting_set --app=$app --key=final_path --value=$final_path
|
||||
#fi
|
||||
|
||||
### If nobody installed your app before 4.1,
|
||||
### then you may safely remove these lines
|
||||
|
||||
# Cleaning legacy permissions
|
||||
if ynh_legacy_permissions_exists; then
|
||||
ynh_legacy_permissions_delete_all
|
||||
|
@ -114,18 +88,10 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
|
|||
then
|
||||
ynh_script_progression --message="Upgrading source files..."
|
||||
|
||||
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
|
||||
|
||||
# FIXME: this should be managed by the core in the future
|
||||
# Here, as a packager, you may have to tweak the ownerhsip/permissions
|
||||
# such that the appropriate users (e.g. maybe www-data) can access
|
||||
# files in some cases.
|
||||
# But FOR THE LOVE OF GOD, do not allow r/x for "others" on the entire folder -
|
||||
# this will be treated as a security issue.
|
||||
chmod 750 "$final_path"
|
||||
chmod -R o-rwx "$final_path"
|
||||
chown -R $app:www-data "$final_path"
|
||||
|
|
Loading…
Reference in a new issue