mirror of
https://github.com/YunoHost-Apps/komga_ynh.git
synced 2024-09-03 19:36:07 +02:00
cleaning
This commit is contained in:
parent
2f69d875d6
commit
b2a082d4d3
7 changed files with 20 additions and 59 deletions
|
@ -9,7 +9,7 @@ komga:
|
||||||
key: changeMe! #required to activate the remember-me auto-login via cookies
|
key: changeMe! #required to activate the remember-me auto-login via cookies
|
||||||
validity: 2592000 #validity of the cookie in seconds, here 1 month
|
validity: 2592000 #validity of the cookie in seconds, here 1 month
|
||||||
database:
|
database:
|
||||||
file: __DATA_DIR__.komga/database.sqlite
|
file: __DATA_DIR__/.komga/database.sqlite
|
||||||
database-backup:
|
database-backup:
|
||||||
path: ~/.komga/database-backup.zip
|
path: ~/.komga/database-backup.zip
|
||||||
schedule: "0 0 */6 * * ?" #every 6 hours
|
schedule: "0 0 */6 * * ?" #every 6 hours
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=Komga server
|
Description=Komga: Media server for your comics
|
||||||
After=network.target
|
After=network.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=simple
|
Type=simple
|
||||||
User=__APP__
|
User=__APP__
|
||||||
Group=__APP__
|
Group=__APP__
|
||||||
WorkingDirectory=__INSTALL_DIR__
|
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__"
|
||||||
Restart=on-failure
|
Restart=on-failure
|
||||||
RestartSec=10
|
RestartSec=10
|
||||||
|
|
12
doc/DESCRIPTION_fr.md
Normal file
12
doc/DESCRIPTION_fr.md
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
Komga est un serveur de bandes dessinées/mangas gratuit et open source.
|
||||||
|
|
||||||
|
### Caractéristiques
|
||||||
|
|
||||||
|
- Parcourez les bibliothèques, les séries et les livres via une interface utilisateur Web réactive qui fonctionne sur les ordinateurs de bureau, les tablettes et les téléphones
|
||||||
|
- Organisez votre bibliothèque avec des collections et des listes de lecture
|
||||||
|
- Modifiez les métadonnées de vos séries et livres
|
||||||
|
- Importer automatiquement les métadonnées intégrées
|
||||||
|
- Lecteur Web avec plusieurs modes de lecture
|
||||||
|
- Gérer plusieurs utilisateurs, avec contrôle d'accès par bibliothèque
|
||||||
|
- Propose une API REST, de nombreux outils et scripts communautaires peuvent interagir avec Komga
|
||||||
|
- Télécharger des fichiers de livres
|
|
@ -28,23 +28,13 @@ ynh_backup --src_path="$install_dir"
|
||||||
ynh_backup --src_path="$data_dir" --is_big
|
ynh_backup --src_path="$data_dir" --is_big
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# BACKUP THE NGINX CONFIGURATION
|
# SYSTEM CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
ynh_backup --src_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# SPECIFIC BACKUP
|
|
||||||
#=================================================
|
|
||||||
# BACKUP LOGROTATE
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
ynh_backup --src_path="/etc/logrotate.d/$app"
|
ynh_backup --src_path="/etc/logrotate.d/$app"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# BACKUP SYSTEMD
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
ynh_backup --src_path="/etc/systemd/system/$app.service"
|
ynh_backup --src_path="/etc/systemd/system/$app.service"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -20,37 +20,22 @@ chown -R $app:www-data "$install_dir"
|
||||||
chmod +x $install_dir/komga.jar
|
chmod +x $install_dir/komga.jar
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# NGINX CONFIGURATION
|
# SYSTEM CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Configuring NGINX web server..." --weight=2
|
ynh_script_progression --message="Adding system configurations related to $app..." --weight=1
|
||||||
|
|
||||||
# Create a dedicated NGINX config
|
# Create a dedicated NGINX config
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# SETUP SYSTEMD
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Configuring a systemd service..." --weight=1
|
|
||||||
|
|
||||||
# Create a dedicated systemd config
|
# Create a dedicated systemd config
|
||||||
ynh_add_systemd_config
|
ynh_add_systemd_config
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# SETUP LOGROTATE
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Configuring log rotation..." --weight=1
|
|
||||||
|
|
||||||
# Use logrotate to manage application logfile(s)
|
# Use logrotate to manage application logfile(s)
|
||||||
ynh_use_logrotate
|
ynh_use_logrotate
|
||||||
|
|
||||||
mkdir -p "/var/log/$app"
|
mkdir -p "/var/log/$app"
|
||||||
chmod 640 "/var/log/$app"
|
chmod 640 "/var/log/$app"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# INTEGRATE SERVICE IN YUNOHOST
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Integrating service in YunoHost..." --weight=2
|
|
||||||
|
|
||||||
yunohost service add $app --description="Media server for your comics, manga and magazines" --log="/var/log/$app/$app.log"
|
yunohost service add $app --description="Media server for your comics, manga and magazines" --log="/var/log/$app/$app.log"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -22,27 +22,12 @@ then
|
||||||
yunohost service remove $app
|
yunohost service remove $app
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# STOP AND REMOVE SERVICE
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Stopping and removing the systemd service..." --weight=2
|
|
||||||
|
|
||||||
# Remove the dedicated systemd config
|
# Remove the dedicated systemd config
|
||||||
ynh_remove_systemd_config
|
ynh_remove_systemd_config
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# REMOVE NGINX CONFIGURATION
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Removing NGINX web server configuration..." --weight=1
|
|
||||||
|
|
||||||
# Remove the dedicated NGINX config
|
# Remove the dedicated NGINX config
|
||||||
ynh_remove_nginx_config
|
ynh_remove_nginx_config
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# REMOVE LOGROTATE CONFIGURATION
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Removing logrotate configuration..." --weight=2
|
|
||||||
|
|
||||||
# Remove the app-specific logrotate config
|
# Remove the app-specific logrotate config
|
||||||
ynh_remove_logrotate
|
ynh_remove_logrotate
|
||||||
|
|
||||||
|
|
|
@ -9,12 +9,6 @@
|
||||||
source _common.sh
|
source _common.sh
|
||||||
source /usr/share/yunohost/helpers
|
source /usr/share/yunohost/helpers
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# CHECK VERSION
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
upgrade_type=$(ynh_check_app_version_changed)
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD UPGRADE STEPS
|
# STANDARD UPGRADE STEPS
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -27,14 +21,9 @@ ynh_systemd_action --service_name=$app --action=stop --log_path="systemd"
|
||||||
#=================================================
|
#=================================================
|
||||||
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
# DOWNLOAD, CHECK AND UNPACK SOURCE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
ynh_script_progression --message="Upgrading source files..." --weight=3
|
||||||
|
|
||||||
if [ "$upgrade_type" == "UPGRADE_APP" ]
|
ynh_setup_source --dest_dir="$install_dir"
|
||||||
then
|
|
||||||
ynh_script_progression --message="Upgrading source files..." --weight=3
|
|
||||||
|
|
||||||
# Download, check integrity, uncompress and patch the source from app.src
|
|
||||||
ynh_setup_source --dest_dir="$install_dir"
|
|
||||||
fi
|
|
||||||
|
|
||||||
chown -R $app:www-data "$install_dir"
|
chown -R $app:www-data "$install_dir"
|
||||||
chmod +x $install_dir/komga.jar
|
chmod +x $install_dir/komga.jar
|
||||||
|
|
Loading…
Add table
Reference in a new issue