mirror of
https://github.com/YunoHost-Apps/kavita_ynh.git
synced 2024-09-03 19:26:30 +02:00
commit
47b20670bd
15 changed files with 109 additions and 60 deletions
|
@ -31,7 +31,7 @@ Kavita is a fast, feature rich, cross platform reading server. Built with a focu
|
||||||
- OPDS-PS Support
|
- OPDS-PS Support
|
||||||
|
|
||||||
|
|
||||||
**Shipped version:** 0.7.1~ynh1
|
**Shipped version:** 0.7.2~ynh1
|
||||||
|
|
||||||
**Demo:** https://demo.kavitareader.com/
|
**Demo:** https://demo.kavitareader.com/
|
||||||
|
|
||||||
|
|
|
@ -31,7 +31,7 @@ Kavita is a fast, feature rich, cross platform reading server. Built with a focu
|
||||||
- OPDS-PS Support
|
- OPDS-PS Support
|
||||||
|
|
||||||
|
|
||||||
**Version incluse :** 0.7.1~ynh1
|
**Version incluse :** 0.7.2~ynh1
|
||||||
|
|
||||||
**Démo :** https://demo.kavitareader.com/
|
**Démo :** https://demo.kavitareader.com/
|
||||||
|
|
||||||
|
|
|
@ -1,7 +0,0 @@
|
||||||
SOURCE_URL=https://github.com/Kareadita/Kavita/releases/download/v0.7.1/kavita-linux-x64.tar.gz
|
|
||||||
SOURCE_SUM=B67B91E97F490D0629AAD00E2B2E78752C57A2E7BDD00D3E1B1461EFEF5F22BA
|
|
||||||
SOURCE_SUM_PRG=sha256sum
|
|
||||||
SOURCE_FORMAT=tar.gz
|
|
||||||
SOURCE_IN_SUBDIR=true
|
|
||||||
SOURCE_FILENAME=
|
|
||||||
SOURCE_EXTRACT=true
|
|
6
conf/appsettings.json.example
Normal file
6
conf/appsettings.json.example
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
{
|
||||||
|
"TokenKey": "super secret unguessable key",
|
||||||
|
"Port": __PORT__,
|
||||||
|
"IpAddresses": "",
|
||||||
|
"BaseUrl": "__URL_PATH__"
|
||||||
|
}
|
|
@ -1,7 +0,0 @@
|
||||||
SOURCE_URL=https://github.com/Kareadita/Kavita/releases/download/v0.7.1/kavita-linux-arm64.tar.gz
|
|
||||||
SOURCE_SUM=DEA4160C72B024BEB47565526DBD71512E8EEB65360D22E76A7E695C0A4C55B7
|
|
||||||
SOURCE_SUM_PRG=sha256sum
|
|
||||||
SOURCE_FORMAT=tar.gz
|
|
||||||
SOURCE_IN_SUBDIR=true
|
|
||||||
SOURCE_FILENAME=
|
|
||||||
SOURCE_EXTRACT=true
|
|
|
@ -1,7 +0,0 @@
|
||||||
SOURCE_URL=https://github.com/Kareadita/Kavita/releases/download/v0.7.1/kavita-linux-arm.tar.gz
|
|
||||||
SOURCE_SUM=AD5CEC73D6B5B48386EAC5291CD9C4B40F0AF4FBB712E730518D3605E80F1D52
|
|
||||||
SOURCE_SUM_PRG=sha256sum
|
|
||||||
SOURCE_FORMAT=tar.gz
|
|
||||||
SOURCE_IN_SUBDIR=true
|
|
||||||
SOURCE_FILENAME=
|
|
||||||
SOURCE_EXTRACT=true
|
|
|
@ -1,17 +1,16 @@
|
||||||
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
|
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
|
||||||
location __PATH__/ {
|
location __PATH__/ {
|
||||||
|
|
||||||
# Host and X headers
|
proxy_pass http://127.0.0.1:__PORT__;
|
||||||
proxy_set_header Host $host;
|
proxy_set_header Host $host;
|
||||||
proxy_set_header X-Real-IP $remote_addr;
|
proxy_set_header X-Real-IP $remote_addr;
|
||||||
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; aio threads;
|
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; aio threads;
|
||||||
proxy_set_header X-Forwarded-Proto $scheme;
|
proxy_set_header X-Forwarded-Proto $scheme;
|
||||||
|
|
||||||
# Headers to proxy websocket connections
|
|
||||||
proxy_http_version 1.1;
|
proxy_http_version 1.1;
|
||||||
proxy_set_header Upgrade $http_upgrade;
|
proxy_set_header Upgrade $http_upgrade;
|
||||||
proxy_set_header Connection "Upgrade";
|
proxy_set_header Connection "Upgrade";
|
||||||
|
|
||||||
# Proxy to Kavita running locally on port 5000 using ssl
|
# Include SSOWAT user panel.
|
||||||
proxy_pass http://127.0.0.1:__PORT__;
|
include conf.d/yunohost_panel.conf.inc;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Kavita Server
|
Description=Kavita: Media server for your comics
|
||||||
After=network.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
|
|
|
@ -5,7 +5,7 @@ name = "Kavita"
|
||||||
description.en = "Media server for your comics, manga and books"
|
description.en = "Media server for your comics, manga and books"
|
||||||
description.fr = "Serveur multimédia pour vos bandes dessinées, mangas et livres"
|
description.fr = "Serveur multimédia pour vos bandes dessinées, mangas et livres"
|
||||||
|
|
||||||
version = "0.7.1~ynh1"
|
version = "0.7.2~ynh1"
|
||||||
|
|
||||||
maintainers = ["eric_G"]
|
maintainers = ["eric_G"]
|
||||||
|
|
||||||
|
@ -17,9 +17,9 @@ admindoc = "https://wiki.kavitareader.com/en"
|
||||||
code = "https://github.com/Kareadita/Kavita"
|
code = "https://github.com/Kareadita/Kavita"
|
||||||
|
|
||||||
[integration]
|
[integration]
|
||||||
yunohost = ">= 11.1.11"
|
yunohost = ">= 11.1.19"
|
||||||
architectures = ["amd64", "arm64", "armhf"]
|
architectures = ["amd64", "arm64", "armhf"]
|
||||||
multi_instance = false
|
multi_instance = true
|
||||||
ldap = false
|
ldap = false
|
||||||
sso = false
|
sso = false
|
||||||
disk = "50M"
|
disk = "50M"
|
||||||
|
@ -28,18 +28,35 @@ ram.runtime = "50M"
|
||||||
|
|
||||||
[install]
|
[install]
|
||||||
[install.domain]
|
[install.domain]
|
||||||
|
|
||||||
type = "domain"
|
type = "domain"
|
||||||
full_domain = true
|
|
||||||
|
[install.path]
|
||||||
|
type = "path"
|
||||||
|
default = "/kavita/"
|
||||||
|
|
||||||
[install.init_main_permission]
|
[install.init_main_permission]
|
||||||
type = "group"
|
type = "group"
|
||||||
default = "visitors"
|
default = "visitors"
|
||||||
|
|
||||||
[resources]
|
[resources]
|
||||||
[resources.ports]
|
|
||||||
main.default = 5000
|
[resources.sources]
|
||||||
|
|
||||||
|
[resources.sources.main]
|
||||||
|
amd64.url = "https://github.com/Kareadita/Kavita/releases/download/v0.7.2/kavita-linux-x64.tar.gz"
|
||||||
|
amd64.sha256 = "d4bc73321e1241a1e6247fc0c5ff14504e73c5b3ce9c22a237fd6eae7fc51f33"
|
||||||
|
arm64.url = "https://github.com/Kareadita/Kavita/releases/download/v0.7.2/kavita-linux-arm64.tar.gz"
|
||||||
|
arm64.sha256 = "634d8b1be654de18ac0238512b9e552e9ad2dd50e6113199907fce525f71f14c"
|
||||||
|
armhf.url = "https://github.com/Kareadita/Kavita/releases/download/v0.7.2/kavita-linux-arm.tar.gz"
|
||||||
|
armhf.sha256 = "3bf7aac85f51432c8cc0a46ea885bb0167b03e9c0209858a76b1785f884cf104"
|
||||||
|
|
||||||
|
#autoupdate.strategy = "latest_github_release"
|
||||||
|
#autoupdate.asset.amd64 = ".*\.amd64.tar.gz"
|
||||||
|
#autoupdate.asset.arm64 = ".*\.arm64.tar.gz"
|
||||||
|
#autoupdate.asset.armhf = ".*\.arm.tar.gz"
|
||||||
|
|
||||||
|
[resources.ports]
|
||||||
|
|
||||||
[resources.system_user]
|
[resources.system_user]
|
||||||
|
|
||||||
[resources.install_dir]
|
[resources.install_dir]
|
||||||
|
@ -47,10 +64,11 @@ ram.runtime = "50M"
|
||||||
[resources.permissions]
|
[resources.permissions]
|
||||||
main.url = "/"
|
main.url = "/"
|
||||||
|
|
||||||
api.url = "/api"
|
api.url = "/api/*"
|
||||||
api.show_tile = false
|
api.show_tile = false
|
||||||
api.protected= true
|
api.protected= true
|
||||||
api.allowed = ["visitors", "all_users"]
|
api.allowed = ["visitors", "all_users"]
|
||||||
|
api.auth_header = false
|
||||||
|
|
||||||
hubs.url = "/hubs/*"
|
hubs.url = "/hubs/*"
|
||||||
hubs.show_tile = false
|
hubs.show_tile = false
|
||||||
|
|
|
@ -6,8 +6,18 @@
|
||||||
# IMPORT GENERIC HELPERS
|
# IMPORT GENERIC HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
|
source _common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# STANDARD MODIFICATIONS
|
||||||
|
#=================================================
|
||||||
|
# STOP SYSTEMD SERVICE
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Stopping a systemd service..." --weight=1
|
||||||
|
|
||||||
|
ynh_systemd_action --service_name=$app --action=stop --log_path=systemd
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# MODIFY URL IN NGINX CONF
|
# MODIFY URL IN NGINX CONF
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -15,8 +25,32 @@ ynh_script_progression --message="Updating NGINX web server configuration..." --
|
||||||
|
|
||||||
ynh_change_url_nginx_config
|
ynh_change_url_nginx_config
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# SPECIFIC MODIFICATIONS
|
||||||
|
#=================================================
|
||||||
|
# CONFIGURE Kavita
|
||||||
|
#=================================================
|
||||||
|
ynh_backup_if_checksum_is_different --file="$install_dir/config/appsettings.json"
|
||||||
|
|
||||||
|
domain=$new_domain
|
||||||
|
url_path=${new_path#/}
|
||||||
|
|
||||||
|
ynh_add_config --template="../conf/appsettings.json.example" --destination="$install_dir/config/appsettings.json"
|
||||||
|
|
||||||
|
chmod 400 "$install_dir/config/appsettings.json"
|
||||||
|
chown $app:$app "$install_dir/config/appsettings.json"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# GENERIC FINALISATION
|
||||||
|
#=================================================
|
||||||
|
# START SYSTEMD SERVICE
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Starting a systemd service..." --weight=1
|
||||||
|
|
||||||
|
# Start a systemd service
|
||||||
|
ynh_systemd_action --service_name=$app --action=start --log_path=systemd
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_script_progression --message="Change of URL completed for $app" --last
|
ynh_script_progression --message="Change of URL completed for $app" --last
|
||||||
|
|
|
@ -12,12 +12,11 @@ source /usr/share/yunohost/helpers
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Setting up source files..." --weight=1
|
ynh_script_progression --message="Setting up source files..." --weight=4
|
||||||
|
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
ynh_setup_source --dest_dir="$install_dir" --source_id=$YNH_ARCH
|
ynh_setup_source --dest_dir="$install_dir"
|
||||||
|
|
||||||
chmod 750 "$install_dir"
|
|
||||||
chmod -R o-rwx "$install_dir"
|
chmod -R o-rwx "$install_dir"
|
||||||
chown -R $app:www-data "$install_dir"
|
chown -R $app:www-data "$install_dir"
|
||||||
chmod +x $install_dir/Kavita
|
chmod +x $install_dir/Kavita
|
||||||
|
@ -35,13 +34,24 @@ ynh_add_systemd_config
|
||||||
|
|
||||||
yunohost service add $app --description="Cross platform reading server" --log="/var/log/$app/$app.log"
|
yunohost service add $app --description="Cross platform reading server" --log="/var/log/$app/$app.log"
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# MODIFY A CONFIG FILE
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Modifying a config file..." --weight=1
|
||||||
|
|
||||||
|
url_path=${path#/}
|
||||||
|
ynh_add_config --template="../conf/appsettings.json.example" --destination="$install_dir/config/appsettings.json"
|
||||||
|
|
||||||
|
chmod 600 "$install_dir/config/appsettings.json"
|
||||||
|
chown $app:$app "$install_dir/config/appsettings.json"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# START SYSTEMD SERVICE
|
# START SYSTEMD SERVICE
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Starting a systemd service..." --weight=1
|
ynh_script_progression --message="Starting a systemd service..." --weight=1
|
||||||
|
|
||||||
# Start a systemd service
|
# Start a systemd service
|
||||||
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
|
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
|
|
|
@ -10,10 +10,11 @@ source _common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD REMOVE
|
# REMOVE SYSTEM CONFIGURATIONS
|
||||||
#=================================================
|
#=================================================
|
||||||
# REMOVE SERVICE INTEGRATION IN YUNOHOST
|
# REMOVE SYSTEMD SERVICE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
|
||||||
|
|
||||||
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
|
# Remove the service from the list of services known by YunoHost (added from `yunohost service add`)
|
||||||
if ynh_exec_warn_less yunohost service status $app >/dev/null
|
if ynh_exec_warn_less yunohost service status $app >/dev/null
|
||||||
|
@ -22,13 +23,6 @@ then
|
||||||
yunohost service remove $app
|
yunohost service remove $app
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# REMOVE SYSTEM CONFIGURATIONS
|
|
||||||
#=================================================
|
|
||||||
# REMOVE SYSTEMD SERVICE
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Removing system configurations related to $app..." --weight=1
|
|
||||||
|
|
||||||
# Remove the dedicated systemd config
|
# Remove the dedicated systemd config
|
||||||
ynh_remove_systemd_config
|
ynh_remove_systemd_config
|
||||||
|
|
||||||
|
|
|
@ -38,7 +38,7 @@ yunohost service add $app --description="Cross platform reading server" --log="/
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1
|
ynh_script_progression --message="Reloading NGINX web server and $app's service..." --weight=1
|
||||||
|
|
||||||
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
|
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd"
|
||||||
|
|
||||||
ynh_systemd_action --service_name=nginx --action=reload
|
ynh_systemd_action --service_name=nginx --action=reload
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ upgrade_type=$(ynh_check_app_version_changed)
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Stopping a systemd service..." --weight=1
|
ynh_script_progression --message="Stopping a systemd service..." --weight=1
|
||||||
|
|
||||||
ynh_systemd_action --service_name=$app --action="stop" --log_path="/var/log/$app/$app.log"
|
ynh_systemd_action --service_name=$app --action="stop" --log_path="systemd"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
|
@ -33,14 +33,24 @@ then
|
||||||
ynh_script_progression --message="Upgrading source files..." --weight=1
|
ynh_script_progression --message="Upgrading source files..." --weight=1
|
||||||
|
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
# Download, check integrity, uncompress and patch the source from app.src
|
||||||
ynh_setup_source --dest_dir="$install_dir" --source_id=$YNH_ARCH --keep="config"
|
ynh_setup_source --dest_dir="$install_dir" --keep="config"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
chmod 750 "$install_dir"
|
|
||||||
chmod -R o-rwx "$install_dir"
|
chmod -R o-rwx "$install_dir"
|
||||||
chown -R $app:www-data "$install_dir"
|
chown -R $app:www-data "$install_dir"
|
||||||
chmod +x $install_dir/Kavita
|
chmod +x $install_dir/Kavita
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# MODIFY A CONFIG FILE
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Modifying a config file..." --weight=1
|
||||||
|
|
||||||
|
url_path=${path#/}
|
||||||
|
ynh_add_config --template="../conf/appsettings.json.example" --destination="$install_dir/config/appsettings.json"
|
||||||
|
|
||||||
|
chmod 600 "$install_dir/config/appsettings.json"
|
||||||
|
chown $app:$app "$install_dir/config/appsettings.json"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REAPPLY SYSTEM CONFIGURATIONS
|
# REAPPLY SYSTEM CONFIGURATIONS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -62,7 +72,7 @@ yunohost service add $app --description="Cross platform reading server" --log="/
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Starting a systemd service..." --weight=1
|
ynh_script_progression --message="Starting a systemd service..." --weight=1
|
||||||
|
|
||||||
ynh_systemd_action --service_name=$app --action="start" --log_path="/var/log/$app/$app.log"
|
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
|
|
|
@ -6,7 +6,6 @@ test_format = 1.0
|
||||||
# Default args to use for install
|
# Default args to use for install
|
||||||
# -------------------------------
|
# -------------------------------
|
||||||
|
|
||||||
|
|
||||||
# -------------------------------
|
# -------------------------------
|
||||||
# Commits to test upgrade from
|
# Commits to test upgrade from
|
||||||
# -------------------------------
|
# -------------------------------
|
Loading…
Add table
Reference in a new issue