mirror of
https://github.com/YunoHost-Apps/kavita_ynh.git
synced 2024-09-03 19:26:30 +02:00
Merge branch 'testing' into pr/6
This commit is contained in:
commit
5094626b5d
9 changed files with 27 additions and 25 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
|
||||||
|
|
||||||
|
|
||||||
**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,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]
|
||||||
|
|
|
@ -17,7 +17,7 @@ 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 = true
|
multi_instance = true
|
||||||
ldap = false
|
ldap = false
|
||||||
|
@ -39,8 +39,18 @@ ram.runtime = "50M"
|
||||||
default = "visitors"
|
default = "visitors"
|
||||||
|
|
||||||
[resources]
|
[resources]
|
||||||
|
|
||||||
|
[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"
|
||||||
|
|
||||||
[resources.ports]
|
[resources.ports]
|
||||||
main.default = 5000
|
|
||||||
|
|
||||||
[resources.sources]
|
[resources.sources]
|
||||||
[resources.sources.main]
|
[resources.sources.main]
|
||||||
|
|
|
@ -5,6 +5,7 @@
|
||||||
#=================================================
|
#=================================================
|
||||||
# IMPORT GENERIC HELPERS
|
# IMPORT GENERIC HELPERS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
source _common.sh
|
source _common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
|
@ -47,7 +48,7 @@ chown $app:$app "$install_dir/config/appsettings.json"
|
||||||
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
|
ynh_systemd_action --service_name=$app --action=start --log_path=systemd
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
|
|
|
@ -15,9 +15,8 @@ source /usr/share/yunohost/helpers
|
||||||
ynh_script_progression --message="Setting up source files..." --weight=4
|
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
|
||||||
|
@ -52,7 +51,7 @@ chown $app:$app "$install_dir/config/appsettings.json"
|
||||||
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
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
|
@ -36,7 +36,6 @@ then
|
||||||
ynh_setup_source --dest_dir="$install_dir" --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
|
||||||
|
@ -51,6 +50,7 @@ ynh_add_config --template="../conf/appsettings.json.example" --destination="$ins
|
||||||
|
|
||||||
chmod 600 "$install_dir/config/appsettings.json"
|
chmod 600 "$install_dir/config/appsettings.json"
|
||||||
chown $app:$app "$install_dir/config/appsettings.json"
|
chown $app:$app "$install_dir/config/appsettings.json"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# REAPPLY SYSTEM CONFIGURATIONS
|
# REAPPLY SYSTEM CONFIGURATIONS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -72,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…
Reference in a new issue