1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/kavita_ynh.git synced 2024-09-03 19:26:30 +02:00

upgrade to v0.7.7

This commit is contained in:
OniriCorpe 2023-08-22 16:54:22 +02:00
parent f9e948898b
commit 5f57eb6b46
8 changed files with 30 additions and 29 deletions

BIN
.manifest.toml.swp Normal file

Binary file not shown.

View file

@ -2,5 +2,6 @@
"TokenKey": "__KEY__", "TokenKey": "__KEY__",
"Port": __PORT__, "Port": __PORT__,
"IpAddresses": "", "IpAddresses": "",
"BaseUrl": "__URL_PATH__" "BaseUrl": "__URL_PATH__",
"Cache": 50
} }

View file

@ -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.2~ynh2" version = "0.7.7~ynh1"
maintainers = ["eric_G"] maintainers = ["eric_G"]
@ -43,12 +43,12 @@ ram.runtime = "50M"
[resources.sources] [resources.sources]
[resources.sources.main] [resources.sources.main]
in_subdir = true in_subdir = true
amd64.url = "https://github.com/Kareadita/Kavita/releases/download/v0.7.2/kavita-linux-x64.tar.gz" amd64.url = "https://github.com/Kareadita/Kavita/releases/download/v0.7.7/kavita-linux-x64.tar.gz"
amd64.sha256 = "d4bc73321e1241a1e6247fc0c5ff14504e73c5b3ce9c22a237fd6eae7fc51f33" amd64.sha256 = "12009b69f6263274752b617d33fd9486ad8b2bf3602ff3309c0cd5496ab3a71a"
arm64.url = "https://github.com/Kareadita/Kavita/releases/download/v0.7.2/kavita-linux-arm64.tar.gz" arm64.url = "https://github.com/Kareadita/Kavita/releases/download/v0.7.7/kavita-linux-arm64.tar.gz"
arm64.sha256 = "634d8b1be654de18ac0238512b9e552e9ad2dd50e6113199907fce525f71f14c" arm64.sha256 = "53d73c0f47822c0772c51f0f3dcc3c911e0a8706d07dd9bf75dea4a21fd89bdb"
armhf.url = "https://github.com/Kareadita/Kavita/releases/download/v0.7.2/kavita-linux-arm.tar.gz" armhf.url = "https://github.com/Kareadita/Kavita/releases/download/v0.7.7/kavita-linux-arm.tar.gz"
armhf.sha256 = "3bf7aac85f51432c8cc0a46ea885bb0167b03e9c0209858a76b1785f884cf104" armhf.sha256 = "283fc142ea9b281c2242dfe7e54774ce273d8990b8f0418dd90ec5bcac85e624"
[resources.ports] [resources.ports]
main.default = 5000 main.default = 5000

View file

@ -16,7 +16,7 @@ source /usr/share/yunohost/helpers
#================================================= #=================================================
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=systemd ynh_systemd_action --service_name="$app" --action=stop --log_path=systemd
#================================================= #=================================================
# MODIFY URL IN NGINX CONF # MODIFY URL IN NGINX CONF
@ -32,13 +32,13 @@ ynh_change_url_nginx_config
#================================================= #=================================================
ynh_backup_if_checksum_is_different --file="$install_dir/config/appsettings.json" ynh_backup_if_checksum_is_different --file="$install_dir/config/appsettings.json"
domain=$new_domain domain="$new_domain"
url_path=${new_path#/} url_path=${new_path#/}
ynh_add_config --template="../conf/appsettings.json.example" --destination="$install_dir/config/appsettings.json" ynh_add_config --template="../conf/appsettings.json.example" --destination="$install_dir/config/appsettings.json"
chmod 400 "$install_dir/config/appsettings.json" chmod 400 "$install_dir/config/appsettings.json"
chown $app:$app "$install_dir/config/appsettings.json" chown "$app":"$app" "$install_dir/config/appsettings.json"
#================================================= #=================================================
# GENERIC FINALISATION # GENERIC FINALISATION
@ -48,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 --log_path=systemd ynh_systemd_action --service_name="$app" --action=start --log_path=systemd
#================================================= #=================================================
# END OF SCRIPT # END OF SCRIPT

View file

@ -18,8 +18,8 @@ ynh_script_progression --message="Setting up source files..." --weight=4
ynh_setup_source --dest_dir="$install_dir" ynh_setup_source --dest_dir="$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
#================================================= #=================================================
# SYSTEM CONFIGURATION # SYSTEM CONFIGURATION
@ -32,7 +32,7 @@ ynh_add_nginx_config
# Create a dedicated systemd config # Create a dedicated systemd config
ynh_add_systemd_config 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 # MODIFY A CONFIG FILE
@ -44,7 +44,7 @@ url_path=${path#/}
ynh_add_config --template="../conf/appsettings.json.example" --destination="$install_dir/config/appsettings.json" ynh_add_config --template="../conf/appsettings.json.example" --destination="$install_dir/config/appsettings.json"
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"
#================================================= #=================================================
# START SYSTEMD SERVICE # START SYSTEMD SERVICE
@ -52,7 +52,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="systemd" ynh_systemd_action --service_name="$app" --action="start" --log_path="systemd"
#================================================= #=================================================
# END OF SCRIPT # END OF SCRIPT

View file

@ -17,10 +17,10 @@ source /usr/share/yunohost/helpers
ynh_script_progression --message="Removing system configurations related to $app..." --weight=1 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
then then
ynh_script_progression --message="Removing $app service integration..." --weight=1 ynh_script_progression --message="Removing $app service integration..." --weight=1
yunohost service remove $app yunohost service remove "$app"
fi fi
# Remove the dedicated systemd config # Remove the dedicated systemd config

View file

@ -19,7 +19,7 @@ ynh_restore_file --origin_path="$install_dir"
chmod 750 "$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"
#================================================= #=================================================
# RESTORE SYSTEM CONFIGURATIONS # RESTORE SYSTEM CONFIGURATIONS
@ -29,16 +29,16 @@ ynh_script_progression --message="Restoring system configurations related to $ap
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
ynh_restore_file --origin_path="/etc/systemd/system/$app.service" ynh_restore_file --origin_path="/etc/systemd/system/$app.service"
systemctl enable $app.service --quiet systemctl enable "$app".service --quiet
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"
#================================================= #=================================================
# START SYSTEMD SERVICE # START SYSTEMD SERVICE
#================================================= #=================================================
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="systemd" 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

View file

@ -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="systemd" ynh_systemd_action --service_name="$app" --action="stop" --log_path="systemd"
#================================================= #=================================================
# DOWNLOAD, CHECK AND UNPACK SOURCE # DOWNLOAD, CHECK AND UNPACK SOURCE
@ -37,8 +37,8 @@ then
fi fi
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 # MODIFY A CONFIG FILE
@ -50,7 +50,7 @@ url_path=${path#/}
ynh_add_config --template="../conf/appsettings.json.example" --destination="$install_dir/config/appsettings.json" ynh_add_config --template="../conf/appsettings.json.example" --destination="$install_dir/config/appsettings.json"
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
@ -66,14 +66,14 @@ ynh_add_systemd_config
# Use logrotate to manage app-specific logfile(s) # Use logrotate to manage app-specific logfile(s)
ynh_use_logrotate --non-append ynh_use_logrotate --non-append
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"
#================================================= #=================================================
# 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
ynh_systemd_action --service_name=$app --action="start" --log_path="systemd" ynh_systemd_action --service_name="$app" --action="start" --log_path="systemd"
#================================================= #=================================================
# END OF SCRIPT # END OF SCRIPT