diff --git a/.manifest.toml.swp b/.manifest.toml.swp new file mode 100644 index 0000000..1af9b14 Binary files /dev/null and b/.manifest.toml.swp differ diff --git a/conf/appsettings.json.example b/conf/appsettings.json.example index 890499a..9ef25a3 100644 --- a/conf/appsettings.json.example +++ b/conf/appsettings.json.example @@ -2,5 +2,6 @@ "TokenKey": "__KEY__", "Port": __PORT__, "IpAddresses": "", - "BaseUrl": "__URL_PATH__" + "BaseUrl": "__URL_PATH__", + "Cache": 50 } diff --git a/manifest.toml b/manifest.toml index 6ae6242..59fb15a 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Kavita" description.en = "Media server for your comics, manga and books" 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"] @@ -43,12 +43,12 @@ ram.runtime = "50M" [resources.sources] [resources.sources.main] in_subdir = true - 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" + amd64.url = "https://github.com/Kareadita/Kavita/releases/download/v0.7.7/kavita-linux-x64.tar.gz" + amd64.sha256 = "12009b69f6263274752b617d33fd9486ad8b2bf3602ff3309c0cd5496ab3a71a" + arm64.url = "https://github.com/Kareadita/Kavita/releases/download/v0.7.7/kavita-linux-arm64.tar.gz" + arm64.sha256 = "53d73c0f47822c0772c51f0f3dcc3c911e0a8706d07dd9bf75dea4a21fd89bdb" + armhf.url = "https://github.com/Kareadita/Kavita/releases/download/v0.7.7/kavita-linux-arm.tar.gz" + armhf.sha256 = "283fc142ea9b281c2242dfe7e54774ce273d8990b8f0418dd90ec5bcac85e624" [resources.ports] main.default = 5000 diff --git a/scripts/change_url b/scripts/change_url index d0fcf24..c646e62 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -16,7 +16,7 @@ source /usr/share/yunohost/helpers #================================================= 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 @@ -32,13 +32,13 @@ ynh_change_url_nginx_config #================================================= ynh_backup_if_checksum_is_different --file="$install_dir/config/appsettings.json" -domain=$new_domain +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" +chown "$app":"$app" "$install_dir/config/appsettings.json" #================================================= # GENERIC FINALISATION @@ -48,7 +48,7 @@ chown $app:$app "$install_dir/config/appsettings.json" 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 +ynh_systemd_action --service_name="$app" --action=start --log_path=systemd #================================================= # END OF SCRIPT diff --git a/scripts/install b/scripts/install index 57a5ff4..e012aa5 100755 --- a/scripts/install +++ b/scripts/install @@ -18,8 +18,8 @@ ynh_script_progression --message="Setting up source files..." --weight=4 ynh_setup_source --dest_dir="$install_dir" chmod -R o-rwx "$install_dir" -chown -R $app:www-data "$install_dir" -chmod +x $install_dir/Kavita +chown -R "$app":www-data "$install_dir" +chmod +x "$install_dir"/Kavita #================================================= # SYSTEM CONFIGURATION @@ -32,7 +32,7 @@ ynh_add_nginx_config # Create a dedicated 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 @@ -44,7 +44,7 @@ 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" +chown "$app":"$app" "$install_dir/config/appsettings.json" #================================================= # 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 # 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 diff --git a/scripts/remove b/scripts/remove index 4c29204..588e772 100755 --- a/scripts/remove +++ b/scripts/remove @@ -17,10 +17,10 @@ source /usr/share/yunohost/helpers 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`) -if ynh_exec_warn_less yunohost service status $app >/dev/null +if ynh_exec_warn_less yunohost service status "$app" >/dev/null then ynh_script_progression --message="Removing $app service integration..." --weight=1 - yunohost service remove $app + yunohost service remove "$app" fi # Remove the dedicated systemd config diff --git a/scripts/restore b/scripts/restore index 6d9970a..7a44c5a 100755 --- a/scripts/restore +++ b/scripts/restore @@ -19,7 +19,7 @@ ynh_restore_file --origin_path="$install_dir" chmod 750 "$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 @@ -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/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 #================================================= 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 diff --git a/scripts/upgrade b/scripts/upgrade index 02663c1..3ee5675 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -22,7 +22,7 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= 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 @@ -37,8 +37,8 @@ then fi chmod -R o-rwx "$install_dir" -chown -R $app:www-data "$install_dir" -chmod +x $install_dir/Kavita +chown -R "$app":www-data "$install_dir" +chmod +x "$install_dir"/Kavita #================================================= # 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" 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 @@ -66,14 +66,14 @@ ynh_add_systemd_config # Use logrotate to manage app-specific logfile(s) 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 #================================================= 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