From 012d6de0154d115505d72c3f20e70183b156f776 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 12 Jun 2024 15:12:04 +0200 Subject: [PATCH 1/3] add settings --- conf/application.yml | 34 ++++++++++++---------------------- conf/systemd.service | 2 +- manifest.toml | 3 +-- scripts/install | 10 ++++++++++ scripts/upgrade | 10 ++++++++++ 5 files changed, 34 insertions(+), 25 deletions(-) diff --git a/conf/application.yml b/conf/application.yml index 43005f9..fb38f86 100644 --- a/conf/application.yml +++ b/conf/application.yml @@ -1,26 +1,16 @@ +# Only keep lines that are relevant to you! +# Lines starting with # are comments +# Make sure indentation is correct (2 spaces at every indentation level), yaml is very sensitive! komga: - libraries-scan-cron: "* */15 * * * ?" #periodic scan every 15 minutes - libraries-scan-cron: "-" #disable periodic scan - libraries-scan-startup: false #scan libraries at startup - libraries-scan-directory-exclusions: #patterns to exclude directories from the scan - - "#recycle" #synology NAS recycle bin - - "@eaDir" #synology NAS index/metadata folders - remember-me: - key: changeMe! #required to activate the remember-me auto-login via cookies - validity: 2592000 #validity of the cookie in seconds, here 1 month + config-dir: __DATA_DIR__/ database: - file: __DATA_DIR__/.komga/database.sqlite - database-backup: - path: ~/.komga/database-backup.zip - schedule: "0 0 */6 * * ?" #every 6 hours - enabled: true - startup: true + file: __DATA_DIR__/database.sqlite + cors.allowed-origins: + - http://127.0.0.1:__PORT__ + delete-empty-collections: true + delete-empty-read-lists: true server: port: __PORT__ - servlet.context-path: __PATH__/ -spring: - datasource: - url: jdbc:h2:/path/to/your/database.h2 #absolute path for Unix - url: jdbc:h2:D:\\komga\database.h2 #absolute path for Windows - url: jdbc:h2:~/.komga/database.h2 #relative path to user home directory - url: jdbc:h2:./komga/database.h2 #relative path to current directory + servlet: + session.timeout: 7d # session timeout, here 7 days + context-path: __PATH__/ diff --git a/conf/systemd.service b/conf/systemd.service index f9e5eca..db4f26b 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -7,7 +7,7 @@ Type=simple User=__APP__ Group=__APP__ WorkingDirectory=__INSTALL_DIR__/ -ExecStart=/usr/bin/java -jar -Xmx1g komga.jar --server.port=__PORT__ --server.servlet.context-path="__PATH__" +ExecStart=/usr/bin/java -jar -Xmx1g komga.jar --server.port=__PORT__ --server.servlet.context-path="__PATH__" --komga.config-dir="__DATA_DIR__/" Restart=on-failure RestartSec=10 diff --git a/manifest.toml b/manifest.toml index 167c656..b23b584 100644 --- a/manifest.toml +++ b/manifest.toml @@ -5,7 +5,7 @@ name = "Komga" description.en = "Media server for your comics, manga and magazines" description.fr = "Serveur multimédia pour vos bandes dessinées, mangas et magazines" -version = "1.10.3~ynh1" +version = "1.11.1~ynh1" maintainers = ["Navan Chauhan"] @@ -55,7 +55,6 @@ ram.runtime = "50M" [resources.install_dir] [resources.data_dir] - subdirs = [".komga"] [resources.permissions] main.url = "/" diff --git a/scripts/install b/scripts/install index 7d144e1..8b80ac6 100755 --- a/scripts/install +++ b/scripts/install @@ -19,6 +19,16 @@ ynh_setup_source --dest_dir="$install_dir" chown -R $app:www-data "$install_dir" chmod +x $install_dir/komga.jar +#================================================= +# APP INITIAL CONFIGURATION +#================================================= +ynh_script_progression --message="Adding $app's configuration files..." --weight=1 + +ynh_add_config --template="application.yml" --destination="$data_dir/application.yml" + +chmod 400 "$data_dir/application.yml" +chown "$app:$app" "$data_dir/application.yml" + #================================================= # SYSTEM CONFIGURATION #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 124f67c..4dee396 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -28,6 +28,16 @@ ynh_setup_source --dest_dir="$install_dir" chown -R $app:www-data "$install_dir" chmod +x $install_dir/komga.jar +#================================================= +# UPDATE A CONFIG FILE +#================================================= +ynh_script_progression --message="Updating $app's configuration files..." --weight=1 + +ynh_add_config --template="application.yml" --destination="$data_dir/application.yml" + +chmod 400 "$data_dir/application.yml" +chown "$app:$app" "$data_dir/application.yml" + #================================================= # REAPPLY SYSTEM CONFIGURATIONS #================================================= From 39ba2c41e83747678755cb11b1c1e27efd94b383 Mon Sep 17 00:00:00 2001 From: yunohost-bot Date: Wed, 12 Jun 2024 13:12:09 +0000 Subject: [PATCH 2/3] Auto-update READMEs --- README.md | 2 +- README_es.md | 2 +- README_eu.md | 2 +- README_fr.md | 2 +- README_gl.md | 2 +- README_zh_Hans.md | 2 +- 6 files changed, 6 insertions(+), 6 deletions(-) diff --git a/README.md b/README.md index 8b7218b..c44a6db 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ Komga is a free and open source comics/mangas server. - Download book files -**Shipped version:** 1.10.3~ynh1 +**Shipped version:** 1.11.1~ynh1 **Demo:** diff --git a/README_es.md b/README_es.md index d9f555c..f4afaca 100644 --- a/README_es.md +++ b/README_es.md @@ -30,7 +30,7 @@ Komga is a free and open source comics/mangas server. - Download book files -**Versión actual:** 1.10.3~ynh1 +**Versión actual:** 1.11.1~ynh1 **Demo:** diff --git a/README_eu.md b/README_eu.md index d46ac82..c95f651 100644 --- a/README_eu.md +++ b/README_eu.md @@ -30,7 +30,7 @@ Komga is a free and open source comics/mangas server. - Download book files -**Paketatutako bertsioa:** 1.10.3~ynh1 +**Paketatutako bertsioa:** 1.11.1~ynh1 **Demoa:** diff --git a/README_fr.md b/README_fr.md index 345404f..3e9d03a 100644 --- a/README_fr.md +++ b/README_fr.md @@ -29,7 +29,7 @@ Komga est un serveur de bandes dessinées/mangas gratuit et open source. - Propose une API REST, de nombreux outils et scripts communautaires peuvent interagir avec Komga - Télécharger des fichiers de livres -**Version incluse :** 1.10.3~ynh1 +**Version incluse :** 1.11.1~ynh1 **Démo :** diff --git a/README_gl.md b/README_gl.md index 2517af3..2940808 100644 --- a/README_gl.md +++ b/README_gl.md @@ -30,7 +30,7 @@ Komga is a free and open source comics/mangas server. - Download book files -**Versión proporcionada:** 1.10.3~ynh1 +**Versión proporcionada:** 1.11.1~ynh1 **Demo:** diff --git a/README_zh_Hans.md b/README_zh_Hans.md index eeb50d7..bfa41b0 100644 --- a/README_zh_Hans.md +++ b/README_zh_Hans.md @@ -30,7 +30,7 @@ Komga is a free and open source comics/mangas server. - Download book files -**分发版本:** 1.10.3~ynh1 +**分发版本:** 1.11.1~ynh1 **演示:** From c9eaa458b85495d27d61e6de265eeef980675855 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Wed, 12 Jun 2024 15:22:23 +0200 Subject: [PATCH 3/3] Update systemd.service --- conf/systemd.service | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/conf/systemd.service b/conf/systemd.service index db4f26b..48b638c 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -7,7 +7,7 @@ Type=simple User=__APP__ Group=__APP__ WorkingDirectory=__INSTALL_DIR__/ -ExecStart=/usr/bin/java -jar -Xmx1g komga.jar --server.port=__PORT__ --server.servlet.context-path="__PATH__" --komga.config-dir="__DATA_DIR__/" +ExecStart=/usr/bin/java -jar -Xmx1g komga.jar --server.port=__PORT__ --server.servlet.context-path="__PATH__/" --komga.config-dir="__DATA_DIR__/" Restart=on-failure RestartSec=10